u
Anirudh Oppiliappan x@icyphox.sh
Sun, 21 Jan 2024 23:43:44 +0200
1 files changed,
2 insertions(+),
12 deletions(-)
jump to
M
web.go
→
web.go
@@ -2986,8 +2986,8 @@
// mastoshit mastopost := mux.Methods("POST").Subrouter() mastoget := mux.Methods("GET").Subrouter() - mastopost.Use(logit) - mastoget.Use(logit) + handlers.LoggingHandler(os.Stdout, mastopost) + handlers.LoggingHandler(os.Stdout, mastoget) mastoget.HandleFunc("/oauth/authorize", showoauthlogin) mastopost.HandleFunc("/oauth/authorize", oauthorize)@@ -3000,13 +3000,3 @@ if err != nil {
elog.Fatal(err) } } - -func logit(h http.Handler) http.Handler { - fn := func(w http.ResponseWriter, r *http.Request) { - handlers.LoggingHandler(os.Stdout, r) - - h.ServeHTTP(w, r) - } - - return http.HandlerFunc(fn) -}