Browse Source

fix not being able to setOneShot in event updates.

pull/1/head
Gisle Aune 3 years ago
parent
commit
27f8c6b91d
  1. 4
      models/eventhandler.go

4
models/eventhandler.go

@ -38,6 +38,7 @@ type EventHandlerUpdate struct {
SetPriority *int `json:"setPriority"`
SetTargetKind *ReferenceKind `json:"setTargetKind"`
SetTargetValue *string `json:"setTargetValue"`
SetOneShot *bool `json:"setOneShot"`
SetConditions map[string]EventCondition `json:"setConditions"`
PatchConditions map[string]*EventCondition `json:"patchConditions"`
SetActions *EventAction `json:"setActions"`
@ -59,6 +60,9 @@ func (h *EventHandler) ApplyUpdate(update EventHandlerUpdate) {
if update.SetActions != nil {
h.Actions = *update.SetActions
}
if update.SetOneShot != nil {
h.OneShot = *update.SetOneShot
}
if update.SetConditions != nil {
h.Conditions = update.SetConditions

Loading…
Cancel
Save