From 2e9673059d5b00131ecfd8604fde31df77f5fc36 Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Wed, 16 Jul 2025 12:18:06 -0700 Subject: [PATCH] cleaning up logging --- handlers/auth.go | 4 ---- handlers/welcome.go | 3 --- 2 files changed, 7 deletions(-) diff --git a/handlers/auth.go b/handlers/auth.go index 4edc53f..965408a 100644 --- a/handlers/auth.go +++ b/handlers/auth.go @@ -24,8 +24,6 @@ func (h *Handler) Callback(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusBadRequest) return } - fmt.Println("Call back happened") - fmt.Println("we are creating the user store") key := os.Getenv("SESSION_SECRET") // Replace with your SESSION_SECRET or similar maxAge := 86400 * 30 // 30 days isProd := false // Set to true when serving over https @@ -41,13 +39,11 @@ func (h *Handler) Callback(w http.ResponseWriter, r *http.Request) { session.Values["user_name"] = user.Name session.Values["avatar_url"] = user.AvatarURL - fmt.Println("we are saving the session") err = session.Save(r, w) if err != nil { fmt.Printf("error saving the session: %v", err) } - fmt.Println("we are about to redirect") http.Redirect(w, r, "/welcome", http.StatusFound) } diff --git a/handlers/welcome.go b/handlers/welcome.go index fb6b9ef..9b728a0 100644 --- a/handlers/welcome.go +++ b/handlers/welcome.go @@ -1,13 +1,10 @@ package handlers import ( - "fmt" "net/http" ) func (h *Handler) Welcome(w http.ResponseWriter, r *http.Request) { - fmt.Printf("we have reached the welcome route") - err := h.Template.ExecuteTemplate(w, "welcome.html", nil) if err != nil { http.Error(w, "Template rendering error", http.StatusInternalServerError)