diff --git a/cmd/melon-tools/main.go b/cmd/melon-tools/main.go index a3ebf74..57a2c11 100644 --- a/cmd/melon-tools/main.go +++ b/cmd/melon-tools/main.go @@ -45,8 +45,9 @@ func main() { gob.Register(uuid.UUID{}) for _, v := range modules { - router.HandleFunc(v.GetEndpoint(), func(rw http.ResponseWriter, req *http.Request) { - http.Redirect(rw, req, v.GetEndpoint()+"/", http.StatusTemporaryRedirect) + a := v.GetEndpoint() + router.HandleFunc(a, func(rw http.ResponseWriter, req *http.Request) { + http.Redirect(rw, req, a+"/", http.StatusTemporaryRedirect) }) v.SetupModule(router.PathPrefix(v.GetEndpoint()).Subrouter(), stateManager.sessionWrapper) }