feat: add resource visibility to user setting (#1190)

This commit is contained in:
boojack
2023-02-27 22:16:33 +08:00
committed by GitHub
parent ae61ade2b1
commit 9577f6dbe8
7 changed files with 100 additions and 17 deletions

View File

@ -30,10 +30,9 @@ func (s *Server) registerMemoRoutes(g *echo.Group) {
}
if memoCreate.Visibility == "" {
userSettingMemoVisibilityKey := api.UserSettingMemoVisibilityKey
userMemoVisibilitySetting, err := s.Store.FindUserSetting(ctx, &api.UserSettingFind{
UserID: userID,
Key: &userSettingMemoVisibilityKey,
Key: api.UserSettingMemoVisibilityKey,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find user setting").SetInternal(err)