use pointer for configchanges struct
This commit is contained in:
@@ -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")
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user