update to new webserver module

This commit is contained in:
2026-01-10 14:46:49 +11:00
parent 28b7ba34f0
commit a0cd269466
14 changed files with 199 additions and 69 deletions

View File

@@ -12,7 +12,14 @@ func Root() http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
ErrorPage(http.StatusNotFound, w, r)
page, err := ErrorPage(http.StatusNotFound)
if err != nil {
// TODO: add logger for this
}
err = page.Render(r.Context(), w)
if err != nil {
// TODO: add logger for this
}
return
}
page.Index().Render(r.Context(), w)