all repos — honk @ 975ba8e3ac4a485bd13ebdbf0eebb2af968200f1

my fork of honk

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

975ba8e3ac4a485bd13ebdbf0eebb2af968200f1

parent

1bc7893e55fea69b1b2287159e6d7a2810fd0788

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

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