add raw string to database
This commit is contained in:
@@ -197,6 +197,7 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// populate other parameters for the Update database record
|
||||
params.Name = sql.NullString{String: event.CloudEvent.Data.VM.Name, Valid: event.CloudEvent.Data.VM.Name != ""}
|
||||
params.RawChangeString = []byte(event.CloudEvent.Data.ConfigChanges.Modified)
|
||||
params.EventId = sql.NullString{String: event.CloudEvent.ID, Valid: event.CloudEvent.ID != ""}
|
||||
params.EventKey = sql.NullString{String: strconv.Itoa(event.CloudEvent.Data.Key), Valid: event.CloudEvent.Data.Key > 0}
|
||||
params.UpdateTime = sql.NullInt64{Int64: unixTimestamp, Valid: unixTimestamp > 0}
|
||||
|
@@ -41,7 +41,7 @@ func New(logger *slog.Logger, database db.Database, buildTime string, sha1ver st
|
||||
//mux.HandleFunc("/api/inventory/vm/update", h.VmUpdateDetails)
|
||||
|
||||
// temporary endpoint
|
||||
mux.HandleFunc("/api/cleanup/updates", h.UpdateCleanup)
|
||||
//mux.HandleFunc("/api/cleanup/updates", h.UpdateCleanup)
|
||||
//mux.HandleFunc("/api/cleanup/vcenter", h.VcCleanup)
|
||||
|
||||
mux.HandleFunc("/api/report/inventory", h.InventoryReportDownload)
|
||||
|
Reference in New Issue
Block a user