refactor: fix linter errors

This commit is contained in:
rramiachraf
2024-07-14 00:43:06 +01:00
parent ea14549d6f
commit b6cae441b3
9 changed files with 55 additions and 43 deletions

View File

@ -1,7 +1,6 @@
package handlers
import (
"context"
"net/http"
"github.com/a-h/templ"
@ -45,7 +44,7 @@ func New(logger *utils.Logger, staticFiles static) *mux.Router {
r.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
views.ErrorPage(404, "page not found").Render(context.Background(), w)
utils.RenderTemplate(w, views.ErrorPage(404, "page not found"), logger)
})
return r