seperate main template from monster form

This commit is contained in:
Patryk Hegenberg 2023-11-29 16:17:36 +01:00
parent 24c11cbd50
commit bf021090ab
3 changed files with 120 additions and 117 deletions

View file

@ -116,7 +116,7 @@ func main() {
func formHandler(filename string) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
tmpl, err := template.ParseFS(content, "templates/base.html", "templates/header.html", "templates/main.html", "templates/footer.html")
tmpl, err := template.ParseFS(content, "templates/base.html", "templates/header.html", "templates/main.html", "templates/footer.html", "templates/monsterForm.html")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return