more cleanup
Some checks are pending
continuous-integration/drone/push Build is passing
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

This commit is contained in:
2024-09-16 12:07:33 +10:00
parent 659347ad87
commit afb85ff34a

View File

@@ -41,7 +41,8 @@ func (h *Handler) VmModify(w http.ResponseWriter, r *http.Request) {
}
if event.CloudEvent.Data.ConfigChanges == nil {
h.Logger.Debug("Received event contains no config change")
h.Logger.Warn("Received event contains no config change")
prettyPrint(event)
} else {
h.Logger.Debug("Received event contains config change info")
configChanges = h.processConfigChanges(event.CloudEvent.Data.ConfigChanges.Modified)
@@ -81,14 +82,11 @@ func (h *Handler) VmModify(w http.ResponseWriter, r *http.Request) {
return
} else {
h.Logger.Debug("created database record", "insert_result", result)
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "Update Request (%d): %v\n", len(reqBody), string(reqBody))
}
}
}
h.Logger.Debug("received update request", "body", string(reqBody))
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "Update Request (%d): %v\n", len(reqBody), string(reqBody))
}
func (h *Handler) processConfigChanges(configChanges string) []map[string]string {