fix(webui): display user accounts menu entry to admin even on error pages

This commit is contained in:
Julien Dessaux 2025-03-18 23:36:41 +01:00
parent 7a3bf725b0
commit 7abe963bfd
Signed by: adyxax
GPG key ID: F92E51B86E07177E
10 changed files with 33 additions and 33 deletions

View file

@ -7,15 +7,15 @@ import (
var errorTemplates = template.Must(template.ParseFS(htmlFS, "html/base.html", "html/error.html"))
func errorResponse(w http.ResponseWriter, status int, err error) {
func errorResponse(w http.ResponseWriter, r *http.Request, status int, err error) {
type ErrorData struct {
Page
Page *Page
Err error
Status int
StatusText string
}
render(w, errorTemplates, status, &ErrorData{
Page: Page{Title: "Error", Section: "error"},
Page: makePage(r, &Page{Title: "Error", Section: "error"}),
Err: err,
Status: status,
StatusText: http.StatusText(status),