Added validation to stop duplicate dashboards with same name from being saved

This commit is contained in:
Torkel Ödegaard
2015-01-05 17:04:29 +01:00
parent 4131b75562
commit 0e3f91508e
6 changed files with 88 additions and 5 deletions
+2 -3
View File
@@ -9,7 +9,8 @@ import (
// Typed errors
var (
ErrDashboardNotFound = errors.New("Account not found")
ErrDashboardNotFound = errors.New("Account not found")
ErrDashboardWithSameNameExists = errors.New("A dashboard with the same name already exists")
)
type Dashboard struct {
@@ -39,8 +40,6 @@ type SearchDashboardsQuery struct {
}
type SaveDashboardCommand struct {
Id string `json:"id"`
Title string `json:"title"`
Dashboard map[string]interface{} `json:"dashboard"`
AccountId int64 `json:"-"`