mainrouter.Handle("/{team}/login/{service}",api.AppHandler(loginWithOAuth)).Methods("GET")// Bug in gorilla.mux prevents us from using regex here.
mainrouter.Handle("/{team}/channels/{channelname}",api.UserRequired(getChannel)).Methods("GET")// Bug in gorilla.mux prevents us from using regex here.
mainrouter.Handle("/{team}/signup/{service}",api.AppHandler(signupWithOAuth)).Methods("GET")// Bug in gorilla.mux prevents us from using regex here.
mainrouter.Handle("/{team}/login/{service}",api.AppHandler(loginWithOAuth)).Methods("GET")// Bug in gorilla.mux prevents us from using regex here.
mainrouter.Handle("/{team}/channels/{channelname}",api.AppHandler(getChannel)).Methods("GET")// Bug in gorilla.mux prevents us from using regex here.
mainrouter.Handle("/{team}/signup/{service}",api.AppHandler(signupWithOAuth)).Methods("GET")// Bug in gorilla.mux prevents us from using regex here.
watchAndParseTemplates()
}
...
...
@@ -205,7 +201,6 @@ func root(c *api.Context, w http.ResponseWriter, r *http.Request) {
page:=NewHtmlTemplatePage("home","Home")
page.Team=team
page.User=user
page.Session=&c.Session
page.Render(c,w)
}
}
...
...
@@ -236,26 +231,10 @@ func login(c *api.Context, w http.ResponseWriter, r *http.Request) {
team=tResult.Data.(*model.Team)
}
// If we are already logged into this team then go to town-square