edit DiagsHistory in diags handlers
Build and Push Docker Image / build_and_push (push) Failing after 1m37s Details

This commit is contained in:
Nicolas CARON 2024-12-18 16:00:38 +01:00
parent c7ac48d373
commit a1adc028df
2 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,9 @@ func (h *ApplicationHandler) DiagsHistory(w http.ResponseWriter, r *http.Request
responses := []diagsstorage.Diag{}
for _, e := range resp.Diags {
responses = append(responses, e.ToStorageType())
if e.Deleted {
responses = append(responses, e.ToStorageType())
}
}
h.Renderer.DiagsHistory(w, r, responses)

View File

@ -203,6 +203,7 @@ func main() {
application.HandleFunc("/diags/{diagid}", applicationHandler.DiagsDisplayDiag)
application.HandleFunc("/diags/{diagid}/update", applicationHandler.DiagUpdate)
application.HandleFunc("/diags/{diagid}/delete", applicationHandler.DiagDelete)
// application.HandleFunc("/diags/history", applicationHandler.DiagsHistory)
export := r.PathPrefix("/exports").Subrouter()
export.HandleFunc("/fleets/bookings", exportsHandler.Bookings)