diff options
| -rw-r--r-- | cmd/server/flash.go | 3 | ||||
| -rw-r--r-- | cmd/server/handlers.go | 1 | ||||
| -rw-r--r-- | cmd/server/hits.go | 1 | ||||
| -rw-r--r-- | cmd/server/main.go | 2 |
4 files changed, 1 insertions, 6 deletions
diff --git a/cmd/server/flash.go b/cmd/server/flash.go index ce0ed04..230a64d 100644 --- a/cmd/server/flash.go +++ b/cmd/server/flash.go @@ -27,14 +27,11 @@ type flashMsg struct { } func flashSet(r *http.Request, l flashLvl, m string) *http.Request { - debug("fetching existing flashes") flashes := flashGet(r) - debug("fetched existing flashes", flashes) if flashes == nil { flashes = make([]flashMsg, 0) } flashes = append(flashes, flashMsg{l, m}) - debug("adding flashes to context") return r.WithContext(context.WithValue(r.Context(), flashCtxKey("flash"), flashes)) } diff --git a/cmd/server/handlers.go b/cmd/server/handlers.go index 85e3b48..d3d07d7 100644 --- a/cmd/server/handlers.go +++ b/cmd/server/handlers.go @@ -21,7 +21,6 @@ type templateData struct { func newTemplateData(r *http.Request) *templateData { out := &templateData{Flashes: flashGet(r)} - log(out) if user := r.Context().Value("user"); user != nil { out.User = user.(*sws.User) } diff --git a/cmd/server/hits.go b/cmd/server/hits.go index 8bb00e9..8c0d703 100644 --- a/cmd/server/hits.go +++ b/cmd/server/hits.go @@ -53,7 +53,6 @@ func handleHitCounter(db sws.CounterStore) http.HandlerFunc { w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Content-Type", "image/gif") w.Write(gifBytes) - log("hit", hit) return } } diff --git a/cmd/server/main.go b/cmd/server/main.go index 5cdc201..6342585 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -254,7 +254,7 @@ func getUserCtx(db sws.UserStore) func(http.Handler) http.Handler { http.Redirect(w, r, flashURL(r, "/login"), http.StatusUnauthorized) return } - log("found user, adding to context") + debug("found user, adding to context") ctx := context.WithValue(r.Context(), "user", user) next.ServeHTTP(w, r.WithContext(ctx)) }) |
