refactoring: Dashboard history restore operation is now reusing existing

operations instead of duplicating a bunch of get & save logic.
This commit is contained in:
Torkel Ödegaard
2017-06-05 17:45:27 +02:00
parent c296ae1178
commit c87418d060
9 changed files with 69 additions and 199 deletions
-10
View File
@@ -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
+2 -1
View File
@@ -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