Feat: add error template

This commit is contained in:
Grail Finder
2025-05-04 08:47:22 +03:00
parent e335bf9dc8
commit 5dbb80121d
3 changed files with 12 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import (
)
func abortWithError(w http.ResponseWriter, msg string) {
w.WriteHeader(500)
tmpl := template.Must(template.ParseGlob("components/*.html"))
tmpl.ExecuteTemplate(w, "error", msg)
}