backend: frontend: fix errors in model struct and add new fields to result table view

This commit is contained in:
Patryk Hegenberg 2023-12-07 15:55:47 +01:00
parent 0fd2775aa3
commit 1a4ac687f4
6 changed files with 189 additions and 153 deletions

View file

@ -20,7 +20,7 @@ func AboutHandler(content embed.FS) http.HandlerFunc {
tmpl, err := template.ParseFS(content, tmplFiles...)
if err != nil {
log.Printf("Template parsing error: %v\n", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
@ -31,7 +31,7 @@ func AboutHandler(content embed.FS) http.HandlerFunc {
err = tmpl.ExecuteTemplate(w, "about", data)
if err != nil {
log.Printf("Template execution error: %v\n", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
http.Error(w, err.Error(), http.StatusBadRequest)
}
}
}