u
Anirudh Oppiliappan x@icyphox.sh
Sun, 21 Jan 2024 23:48:28 +0200
1 files changed,
9 insertions(+),
2 deletions(-)
jump to
M
web.go
→
web.go
@@ -2986,8 +2986,15 @@
// mastoshit mastopost := mux.Methods("POST").Subrouter() mastoget := mux.Methods("GET").Subrouter() - handlers.LoggingHandler(os.Stdout, mastopost) - handlers.LoggingHandler(os.Stdout, mastoget) + mastogetlog := handlers.LoggingHandler(os.Stdout, mastoget) + mastopostlog := handlers.LoggingHandler(os.Stdout, mastopost) + + mastopost.Use(func(http.Handler) http.Handler { + return mastopostlog + }) + mastoget.Use(func(http.Handler) http.Handler { + return mastogetlog + }) mastoget.HandleFunc("/oauth/authorize", showoauthlogin) mastopost.HandleFunc("/oauth/authorize", oauthorize)