Navigation: Backend to save navigation customization into preferences (#89783)
This commit is contained in:
@@ -18,6 +18,7 @@ type UpdatePrefsCmd struct {
|
||||
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
Language string `json:"language"`
|
||||
Cookies []pref.CookieType `json:"cookies,omitempty"`
|
||||
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
@@ -34,4 +35,5 @@ type PatchPrefsCmd struct {
|
||||
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
|
||||
Cookies []pref.CookieType `json:"cookies,omitempty"`
|
||||
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ func (hs *HTTPServer) patchPreferencesFor(ctx context.Context, orgID, userID, te
|
||||
Language: dtoCmd.Language,
|
||||
QueryHistory: dtoCmd.QueryHistory,
|
||||
CookiePreferences: dtoCmd.Cookies,
|
||||
Navbar: dtoCmd.Navbar,
|
||||
}
|
||||
|
||||
if err := hs.preferenceService.Patch(ctx, &patchCmd); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user