fix not being able to setOneShot in event updates.
This commit is contained in:
@@ -38,6 +38,7 @@ type EventHandlerUpdate struct {
|
|||||||
SetPriority *int `json:"setPriority"`
|
SetPriority *int `json:"setPriority"`
|
||||||
SetTargetKind *ReferenceKind `json:"setTargetKind"`
|
SetTargetKind *ReferenceKind `json:"setTargetKind"`
|
||||||
SetTargetValue *string `json:"setTargetValue"`
|
SetTargetValue *string `json:"setTargetValue"`
|
||||||
|
SetOneShot *bool `json:"setOneShot"`
|
||||||
SetConditions map[string]EventCondition `json:"setConditions"`
|
SetConditions map[string]EventCondition `json:"setConditions"`
|
||||||
PatchConditions map[string]*EventCondition `json:"patchConditions"`
|
PatchConditions map[string]*EventCondition `json:"patchConditions"`
|
||||||
SetActions *EventAction `json:"setActions"`
|
SetActions *EventAction `json:"setActions"`
|
||||||
@@ -59,6 +60,9 @@ func (h *EventHandler) ApplyUpdate(update EventHandlerUpdate) {
|
|||||||
if update.SetActions != nil {
|
if update.SetActions != nil {
|
||||||
h.Actions = *update.SetActions
|
h.Actions = *update.SetActions
|
||||||
}
|
}
|
||||||
|
if update.SetOneShot != nil {
|
||||||
|
h.OneShot = *update.SetOneShot
|
||||||
|
}
|
||||||
|
|
||||||
if update.SetConditions != nil {
|
if update.SetConditions != nil {
|
||||||
h.Conditions = update.SetConditions
|
h.Conditions = update.SetConditions
|
||||||
|
|||||||
Reference in New Issue
Block a user