Preferences: Use dashboard uid for the home dashboard (#106666)
This commit is contained in:
@@ -18,19 +18,21 @@ var ErrUnknownCookieType = errutil.BadRequest(
|
||||
)
|
||||
|
||||
type Preference struct {
|
||||
ID int64 `xorm:"pk autoincr 'id'" db:"id"`
|
||||
OrgID int64 `xorm:"org_id" db:"org_id"`
|
||||
UserID int64 `xorm:"user_id" db:"user_id"`
|
||||
TeamID int64 `xorm:"team_id" db:"team_id"`
|
||||
Teams []int64 `xorm:"extends"`
|
||||
Version int `db:"version"`
|
||||
HomeDashboardID int64 `xorm:"home_dashboard_id" db:"home_dashboard_id"`
|
||||
Timezone string `db:"timezone"`
|
||||
WeekStart *string `db:"week_start"`
|
||||
Theme string `db:"theme"`
|
||||
Created time.Time `db:"created"`
|
||||
Updated time.Time `db:"updated"`
|
||||
JSONData *PreferenceJSONData `xorm:"json_data" db:"json_data"`
|
||||
ID int64 `xorm:"pk autoincr 'id'" db:"id"`
|
||||
OrgID int64 `xorm:"org_id" db:"org_id"`
|
||||
UserID int64 `xorm:"user_id" db:"user_id"`
|
||||
TeamID int64 `xorm:"team_id" db:"team_id"`
|
||||
Teams []int64 `xorm:"extends"`
|
||||
Version int `db:"version"`
|
||||
// Deprecated: Use HomeDashboardUID instead
|
||||
HomeDashboardID int64 `xorm:"home_dashboard_id" db:"home_dashboard_id"`
|
||||
HomeDashboardUID string `xorm:"home_dashboard_uid" db:"home_dashboard_uid"`
|
||||
Timezone string `db:"timezone"`
|
||||
WeekStart *string `db:"week_start"`
|
||||
Theme string `db:"theme"`
|
||||
Created time.Time `db:"created"`
|
||||
Updated time.Time `db:"updated"`
|
||||
JSONData *PreferenceJSONData `xorm:"json_data" db:"json_data"`
|
||||
}
|
||||
|
||||
func (p Preference) Cookies(typ string) bool {
|
||||
@@ -59,6 +61,7 @@ type SavePreferenceCommand struct {
|
||||
OrgID int64
|
||||
TeamID int64
|
||||
|
||||
// Deprecated: Use HomeDashboardUID instead
|
||||
HomeDashboardID int64 `json:"homeDashboardId,omitempty"`
|
||||
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
|
||||
Timezone string `json:"timezone,omitempty"`
|
||||
@@ -76,6 +79,7 @@ type PatchPreferenceCommand struct {
|
||||
OrgID int64
|
||||
TeamID int64
|
||||
|
||||
// Deprecated: Use HomeDashboardUID instead
|
||||
HomeDashboardID *int64 `json:"homeDashboardId,omitempty"`
|
||||
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
|
||||
Timezone *string `json:"timezone,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user