added logging

This commit is contained in:
Patryk Hegenberg 2023-12-04 11:14:37 +01:00
parent a408e1487d
commit 2d3f1ef951
6 changed files with 9 additions and 2 deletions

View file

@ -5,6 +5,7 @@ import (
"embed"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"sync"
@ -14,6 +15,7 @@ var mu sync.Mutex
// submitHandler verarbeitet die Formulardaten
func SubmitHandler(content embed.FS, chars *[]model.Character, Monsters *[]model.Monster, filename string) http.HandlerFunc {
log.Print("SubmitHandler called")
return func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)