diff --git a/data.db b/data.db index bd2481b..601be22 100644 Binary files a/data.db and b/data.db differ diff --git a/main.go b/main.go index 390f78c..73d4ae9 100644 --- a/main.go +++ b/main.go @@ -401,6 +401,7 @@ func main() { }) http.HandleFunc("/markaspaid", func(w http.ResponseWriter, r *http.Request) { + fmt.Println("Method", "/markaspaid", r.Method) if !isAuthenticated(r) { http.Error(w, "Nicht autorisiert", http.StatusUnauthorized) return @@ -419,6 +420,7 @@ func main() { }) http.HandleFunc("/unmarkaspaid", func(w http.ResponseWriter, r *http.Request) { + fmt.Println("Method", "/unmarkaspaid", r.Method) if !isAuthenticated(r) { http.Error(w, "Nicht autorisiert", http.StatusUnauthorized) return @@ -437,6 +439,7 @@ func main() { }) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Println("Method", "/", r.Method) if r.Method == http.MethodPost { if !isAuthenticated(r) { http.Error(w, "Nicht autorisiert", http.StatusUnauthorized) @@ -474,6 +477,7 @@ func main() { cachedData := cache.Data cacheMutex.RUnlock() + fmt.Println("validCache:", validCache) if validCache { cachedData.LoggedIn = isAuthenticated(r) tmpl.Execute(w, cachedData) @@ -630,7 +634,7 @@ func main() { cache.Data = computed cache.LastComputed = time.Now() cacheMutex.Unlock() - + computed.LoggedIn = isAuthenticated(r) tmpl.Execute(w, computed) /*tmpl.Execute(w, struct {