re-enable endpoint to remove updates with no associated inventory record
This commit is contained in:
@@ -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().InventoryCleanupTemplates(context.Background())
|
||||
//err := h.Database.Queries().InventoryCleanupTemplates(context.Background())
|
||||
err := h.Database.Queries().CleanupUpdatesNullVm(context.Background())
|
||||
|
||||
if err != nil {
|
||||
h.Logger.Error("Error received cleaning updates table", "error", err)
|
||||
|
@@ -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