use pointer for configchanges struct
Some checks are pending
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-16 09:01:03 +10:00
parent 19d5b2406e
commit 85bb431de1
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ func (h *Handler) VmModify(w http.ResponseWriter, r *http.Request) {
prettyPrint(event) prettyPrint(event)
} }
if (models.ConfigChangesReceived{} == event.CloudEvent.Data.ConfigChanges) { if event.CloudEvent.Data.ConfigChanges == nil {
h.Logger.Debug("Received event contains no config change") h.Logger.Debug("Received event contains no config change")
} else { } else {
h.Logger.Debug("Received event contains config change info") h.Logger.Debug("Received event contains config change info")

View File

@@ -59,7 +59,7 @@ type CloudEventReceived struct {
} `json:"Vm"` } `json:"Vm"`
} `json:"Vm"` } `json:"Vm"`
ConfigSpec *json.RawMessage `json:"configSpec"` ConfigSpec *json.RawMessage `json:"configSpec"`
ConfigChanges ConfigChangesReceived `json:"configChanges"` ConfigChanges *ConfigChangesReceived `json:"configChanges"`
} `json:"data"` } `json:"data"`
} `json:"cloudEvent"` } `json:"cloudEvent"`
} }