re-enable endpoint to remove updates with no associated inventory record
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-10-15 17:05:14 +11:00
parent b07ed9ee09
commit fb40abfd48
2 changed files with 3 additions and 2 deletions

View File

@@ -26,7 +26,8 @@ func (h *Handler) UpdateCleanup(w http.ResponseWriter, r *http.Request) {
err := h.Database.Queries().CleanupUpdates(context.Background(), params) err := h.Database.Queries().CleanupUpdates(context.Background(), params)
*/ */
err := h.Database.Queries().InventoryCleanupTemplates(context.Background()) //err := h.Database.Queries().InventoryCleanupTemplates(context.Background())
err := h.Database.Queries().CleanupUpdatesNullVm(context.Background())
if err != nil { if err != nil {
h.Logger.Error("Error received cleaning updates table", "error", err) h.Logger.Error("Error received cleaning updates table", "error", err)

View File

@@ -41,7 +41,7 @@ func New(logger *slog.Logger, database db.Database, buildTime string, sha1ver st
//mux.HandleFunc("/api/inventory/vm/update", h.VmUpdateDetails) //mux.HandleFunc("/api/inventory/vm/update", h.VmUpdateDetails)
// temporary endpoint // 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/cleanup/vcenter", h.VcCleanup)
mux.HandleFunc("/api/report/inventory", h.InventoryReportDownload) mux.HandleFunc("/api/report/inventory", h.InventoryReportDownload)