Query history: Save user preferences in database (#47506)
This commit is contained in:
@@ -53,6 +53,7 @@ func (hs *HTTPServer) getPreferencesFor(ctx context.Context, orgID, userID, team
|
||||
|
||||
if prefsQuery.Result.JsonData != nil {
|
||||
dto.Navbar = prefsQuery.Result.JsonData.Navbar
|
||||
dto.QueryHistory = prefsQuery.Result.JsonData.QueryHistory
|
||||
}
|
||||
|
||||
return response.JSON(200, &dto)
|
||||
@@ -110,6 +111,7 @@ func (hs *HTTPServer) patchPreferencesFor(ctx context.Context, orgID, userID, te
|
||||
WeekStart: dtoCmd.WeekStart,
|
||||
HomeDashboardId: dtoCmd.HomeDashboardID,
|
||||
Navbar: dtoCmd.Navbar,
|
||||
QueryHistory: dtoCmd.QueryHistory,
|
||||
}
|
||||
|
||||
if err := hs.SQLStore.PatchPreferences(ctx, &patchCmd); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user