refactored view package

This commit is contained in:
2026-02-09 19:30:47 +11:00
parent fa3b8e3982
commit 0b3301f921
47 changed files with 653 additions and 490 deletions

View File

@@ -34,3 +34,12 @@ func renderSafely(page templ.Component, s *hws.Server, r *http.Request, w http.R
throw.InternalServiceError(s, w, r, "Failed to render page", errors.Wrap(err, "page."))
}
}
func logError(s *hws.Server, msg string, err error) {
s.LogError(hws.HWSError{
Message: msg,
Error: err,
Level: hws.ErrorERROR,
StatusCode: http.StatusInternalServerError,
})
}