all repos — honk @ 1bc7893e55fea69b1b2287159e6d7a2810fd0788

my fork of honk

u
Anirudh Oppiliappan x@icyphox.sh
Sun, 21 Jan 2024 23:48:28 +0200
commit

1bc7893e55fea69b1b2287159e6d7a2810fd0788

parent

9a4790c031ab932cde82e84b1433085062c71f8e

1 files changed, 9 insertions(+), 2 deletions(-)

jump to
M web.goweb.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)