u
Anirudh Oppiliappan x@icyphox.sh
Sun, 21 Jan 2024 23:50:42 +0200
1 files changed,
2 insertions(+),
10 deletions(-)
jump to
M
web.go
→
web.go
@@ -2986,15 +2986,6 @@
// mastoshit mastopost := mux.Methods("POST").Subrouter() mastoget := mux.Methods("GET").Subrouter() - 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)@@ -3002,7 +2993,8 @@ mastopost.HandleFunc("/oauth/token", oauthtoken)
mastoget.HandleFunc("/api/v1/instance", instance) mastopost.HandleFunc("/api/v1/apps", apiapps) - err = http.Serve(listener, mux) + loggedmux := handlers.LoggingHandler(os.Stdout, mux) + err = http.Serve(listener, loggedmux) if err != nil { elog.Fatal(err) }