Query history: Save user preferences in database (#47506)

This commit is contained in:
Ivana Huckova
2022-04-12 11:42:42 +02:00
committed by GitHub
parent cfaf058b20
commit 201557c6fc
4 changed files with 58 additions and 22 deletions
+18 -11
View File
@@ -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"`
}