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)
}
if (models.ConfigChangesReceived{} == event.CloudEvent.Data.ConfigChanges) {
if event.CloudEvent.Data.ConfigChanges == nil {
h.Logger.Debug("Received event contains no config change")
} else {
h.Logger.Debug("Received event contains config change info")

View File

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