From 13ebaee9fe7a485421369d4cf8392d193688cd9f Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Wed, 30 Dec 2020 19:11:31 -0500 Subject: [PATCH] Don't show cookie policy after login --- site-api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site-api.go b/site-api.go index 9e5f6d0..1f6c82e 100644 --- a/site-api.go +++ b/site-api.go @@ -57,9 +57,11 @@ func greetUser(w http.ResponseWriter, r *http.Request) { defer log.PanicSafe() log.LogInfo(fmt.Sprintf("%s called greetUser", getSessionIdentifier(r))) loggedIn, username := detectUser(r, "greetUser") - fmt.Fprintf(w, pageBuilder(r, "home")) + if loggedIn { fmt.Fprintf(w, strings.Replace(bodyWrapper(r, "loggedIn"), "$USER", username, -1)) + } else { + fmt.Fprintf(w, pageBuilder(r, "home")) } }