fix: empty JSON arrays instead of null for alerts/events/runs
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user