add various missing error handling

This commit is contained in:
2026-05-27 18:43:27 +00:00
parent 26a21e6cc7
commit 08cd4dfaaa
4 changed files with 54 additions and 20 deletions
+6 -2
View File
@@ -64,10 +64,14 @@ func HandleGETBackupsFragment(c *gin.Context) {
}
c.Header("Content-Type", "text/plain")
common.TMPL.ExecuteTemplate(c.Writer, "html/backups-backups.go.tmpl", gin.H{
err = common.TMPL.ExecuteTemplate(c.Writer, "html/backups-backups.go.tmpl", gin.H{
"backups": backups,
})
c.Status(http.StatusOK)
if err != nil {
c.Status(http.StatusInternalServerError)
} else {
c.Status(http.StatusOK)
}
} else { // return 401
c.Status(http.StatusUnauthorized)
}