diff --git a/middleware/middleware.go b/middleware/middleware.go index d655d5b..c30578c 100644 --- a/middleware/middleware.go +++ b/middleware/middleware.go @@ -64,7 +64,7 @@ func Handler(next http.Handler) http.Handler { writer.Header().Set("Access-Control-Allow-Methods", fmt.Sprintf("%s, OPTIONS", utils.Getenv("CORS_METHODS"))) writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization") next.ServeHTTP(wrappedWriter, request) - log.Info(fmt.Sprintf("%s %s %s %v \n", utils.ClientIP(request), request.Method, request.RequestURI, wrappedWriter.statusCode)) + log.Info(fmt.Sprintf("%s %s %s %v", utils.ClientIP(request), request.Method, request.RequestURI, wrappedWriter.statusCode)) }) } diff --git a/routes/routes.go b/routes/routes.go index a5a3e98..51c46df 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -193,11 +193,6 @@ func SetupRoutes() *http.ServeMux { http.ServeFile(w, r, "public/favicon.ico") }) - //TODO add error message catching to the middleware so we can show the error message at the error page - handler.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "anjay", http.StatusInternalServerError) - }) - fileServer := http.FileServer(http.Dir("./public")) handler.Handle("/public/", http.StripPrefix("/public", fileServer)) diff --git a/view/auth/auth.templ b/view/auth/auth.templ index 804944b..413d7fc 100644 --- a/view/auth/auth.templ +++ b/view/auth/auth.templ @@ -75,7 +75,7 @@ templ form(err types.Message, title string) {
diff --git a/view/error/error.templ b/view/error/error.templ index 6bf5868..df48245 100644 --- a/view/error/error.templ +++ b/view/error/error.templ @@ -13,7 +13,7 @@ templ NotFound(title string){