From 5160a107de59d75f4394e1d8b12fb1ec05ab18c2 Mon Sep 17 00:00:00 2001 From: Stein Ivar Berghei Date: Thu, 2 Nov 2023 21:06:24 +0100 Subject: [PATCH] fixup! Time for React! --- routes.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/routes.go b/routes.go index 90cb2f3..98e1fe4 100644 --- a/routes.go +++ b/routes.go @@ -23,8 +23,6 @@ import ( "github.com/markbates/goth/gothic" "github.com/markbates/goth/providers/discord" "golang.org/x/exp/slices" - - _ "net/http/pprof" ) const COOKIE_NAME = "_dndmusicbot" @@ -76,11 +74,7 @@ func init() { })) go func() { - log.Println(http.ListenAndServe("localhost:6060", nil)) - }() - - go func() { - log.Fatal(http.ListenAndServe(":"+config.GetString("web.port"), app.router)) + log.Fatal(http.ListenAndServe(":8824", app.router)) }() } @@ -164,10 +158,6 @@ func (app App) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter. func auth(n httprouter.Handle) httprouter.Handle { return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - if os.Getenv("APP_ENV") == "test" { - n(w, r, ps) - return - } values := r.URL.Query() values.Add("provider", "discord") r.URL.RawQuery = values.Encode()