fix(alerting): minor fix

This commit is contained in:
Torkel Ödegaard
2016-07-19 09:28:49 +02:00
parent b0fe69822a
commit 0f555d6ab5
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ type AlertState struct {
Id int64 `json:"-"`
OrgId int64 `json:"-"`
AlertId int64 `json:"alertId"`
NewState string `json:"newState"`
State string `json:"state"`
Created time.Time `json:"created"`
Info string `json:"info"`
TriggeredAlerts *simplejson.Json `json:"triggeredAlerts"`
@@ -19,7 +19,7 @@ type AlertState struct {
func (this *UpdateAlertStateCommand) IsValidState() bool {
for _, v := range alertstates.ValidStates {
if this.NewState == v {
if this.State == v {
return true
}
}
@@ -31,7 +31,7 @@ func (this *UpdateAlertStateCommand) IsValidState() bool {
type UpdateAlertStateCommand struct {
AlertId int64 `json:"alertId" binding:"Required"`
OrgId int64 `json:"orgId" binding:"Required"`
NewState string `json:"newState" binding:"Required"`
State string `json:"state" binding:"Required"`
Info string `json:"info"`
TriggeredAlerts *simplejson.Json `json:"triggeredAlerts"`