fix: empty JSON arrays instead of null for alerts/events/runs
CI / go test + web typecheck (push) Canceled after 0s
CI / build + deploy (Nix) — flowsight (push) Canceled after 0s

This commit is contained in:
asepharyana
2026-09-15 15:44:27 +07:00
parent 9a441c71a6
commit fee313ce97
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -101,6 +101,9 @@ func (s *Server) RunHistory(w http.ResponseWriter, r *http.Request) {
writeErr(w, http.StatusBadGateway, "db: "+err.Error())
return
}
if hist == nil {
hist = []map[string]any{}
}
writeJSON(w, http.StatusOK, map[string]any{"runs": hist})
}