Query history: Save user preferences in database (#47506)
This commit is contained in:
+18
-11
@@ -49,8 +49,13 @@ type NavbarPreference struct {
|
||||
SavedItems []NavLink `json:"savedItems"`
|
||||
}
|
||||
|
||||
type QueryHistoryPreference struct {
|
||||
HomeTab string `json:"homeTab"`
|
||||
}
|
||||
|
||||
type PreferencesJsonData struct {
|
||||
Navbar NavbarPreference `json:"navbar"`
|
||||
Navbar NavbarPreference `json:"navbar"`
|
||||
QueryHistory QueryHistoryPreference `json:"queryHistory"`
|
||||
}
|
||||
|
||||
// ---------------------
|
||||
@@ -78,11 +83,12 @@ type SavePreferencesCommand struct {
|
||||
OrgId int64
|
||||
TeamId int64
|
||||
|
||||
HomeDashboardId int64 `json:"homeDashboardId,omitempty"`
|
||||
Timezone string `json:"timezone,omitempty"`
|
||||
WeekStart string `json:"weekStart,omitempty"`
|
||||
Theme string `json:"theme,omitempty"`
|
||||
Navbar *NavbarPreference `json:"navbar,omitempty"`
|
||||
HomeDashboardId int64 `json:"homeDashboardId,omitempty"`
|
||||
Timezone string `json:"timezone,omitempty"`
|
||||
WeekStart string `json:"weekStart,omitempty"`
|
||||
Theme string `json:"theme,omitempty"`
|
||||
Navbar *NavbarPreference `json:"navbar,omitempty"`
|
||||
QueryHistory *QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
}
|
||||
|
||||
type PatchPreferencesCommand struct {
|
||||
@@ -90,9 +96,10 @@ type PatchPreferencesCommand struct {
|
||||
OrgId int64
|
||||
TeamId int64
|
||||
|
||||
HomeDashboardId *int64 `json:"homeDashboardId,omitempty"`
|
||||
Timezone *string `json:"timezone,omitempty"`
|
||||
WeekStart *string `json:"weekStart,omitempty"`
|
||||
Theme *string `json:"theme,omitempty"`
|
||||
Navbar *NavbarPreference `json:"navbar,omitempty"`
|
||||
HomeDashboardId *int64 `json:"homeDashboardId,omitempty"`
|
||||
Timezone *string `json:"timezone,omitempty"`
|
||||
WeekStart *string `json:"weekStart,omitempty"`
|
||||
Theme *string `json:"theme,omitempty"`
|
||||
Navbar *NavbarPreference `json:"navbar,omitempty"`
|
||||
QueryHistory *QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user