fixup! Time for React!
parent
622ced68b2
commit
5160a107de
12
routes.go
12
routes.go
|
@ -23,8 +23,6 @@ import (
|
||||||
"github.com/markbates/goth/gothic"
|
"github.com/markbates/goth/gothic"
|
||||||
"github.com/markbates/goth/providers/discord"
|
"github.com/markbates/goth/providers/discord"
|
||||||
"golang.org/x/exp/slices"
|
"golang.org/x/exp/slices"
|
||||||
|
|
||||||
_ "net/http/pprof"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const COOKIE_NAME = "_dndmusicbot"
|
const COOKIE_NAME = "_dndmusicbot"
|
||||||
|
@ -76,11 +74,7 @@ func init() {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
log.Println(http.ListenAndServe("localhost:6060", nil))
|
log.Fatal(http.ListenAndServe(":8824", app.router))
|
||||||
}()
|
|
||||||
|
|
||||||
go func() {
|
|
||||||
log.Fatal(http.ListenAndServe(":"+config.GetString("web.port"), app.router))
|
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,10 +158,6 @@ func (app App) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter.
|
||||||
|
|
||||||
func auth(n httprouter.Handle) httprouter.Handle {
|
func auth(n httprouter.Handle) httprouter.Handle {
|
||||||
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
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 := r.URL.Query()
|
||||||
values.Add("provider", "discord")
|
values.Add("provider", "discord")
|
||||||
r.URL.RawQuery = values.Encode()
|
r.URL.RawQuery = values.Encode()
|
||||||
|
|
Loading…
Reference in New Issue