From ff2f37f718a97bdca3c8af878dd5c34cee7a7abf Mon Sep 17 00:00:00 2001 From: jbergner Date: Fri, 1 Aug 2025 21:00:10 +0200 Subject: [PATCH] =?UTF-8?q?Bug=20behoben:=20Wenn=20Eintr=C3=A4ge=20bearbei?= =?UTF-8?q?tet=20werden,=20wird=20man=20visuell=20abgemeldet.=20Das=20stim?= =?UTF-8?q?mt=20jedoch=20nicht,=20und=20mit=20eine=20F5=20ist=20man=20wied?= =?UTF-8?q?er=20angemeldet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data.db | Bin 12288 -> 12288 bytes main.go | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data.db b/data.db index bd2481b892ad55ba9696004a9d50ef5909970162..601be22ee08b63b599f69c7269df190872d90b9e 100644 GIT binary patch delta 17 YcmZojXh@hK%~(89#+k8rW5NP`05{YIBme*a delta 17 YcmZojXh@hK&6qh+#+fm5W5NP`05?7c5C8xG 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 {