refactoring: Dashboard history restore operation is now reusing existing
operations instead of duplicating a bunch of get & save logic.
This commit is contained in:
@@ -82,16 +82,6 @@ type GetDashboardVersionsQuery struct {
|
||||
// Commands
|
||||
//
|
||||
|
||||
// RestoreDashboardVersionCommand creates a new dashboard version.
|
||||
type RestoreDashboardVersionCommand struct {
|
||||
DashboardId int64 `json:"dashboardId"`
|
||||
Version int `json:"version" binding:"Required"`
|
||||
UserId int64 `json:"-"`
|
||||
OrgId int64 `json:"-"`
|
||||
|
||||
Result *Dashboard
|
||||
}
|
||||
|
||||
// CompareDashboardVersionsCommand is used to compare two versions.
|
||||
type CompareDashboardVersionsCommand struct {
|
||||
OrgId int64
|
||||
|
||||
@@ -151,7 +151,8 @@ type DeleteDashboardCommand struct {
|
||||
//
|
||||
|
||||
type GetDashboardQuery struct {
|
||||
Slug string
|
||||
Slug string // required if no Id is specified
|
||||
Id int64 // optional if slug is set
|
||||
OrgId int64
|
||||
|
||||
Result *Dashboard
|
||||
|
||||
Reference in New Issue
Block a user