Example #1
0
func registerAccountHandlers(r *mux.Router, s *util.Server) {
	r.Handle("/dashboard", s.Handle(Protect(dashboardHandler))).Methods("GET").Name("dashboard")
}
Example #2
0
func registerAuthHandlers(r *mux.Router, s *util.Server) {
	r.Handle("/login", s.Handle(loginHandler)).Methods("GET", "POST").Name("login")
	r.Handle("/logout", s.Handle(logoutHandler)).Methods("GET").Name("logout")
}
Example #3
0
func registerSignupHandlers(r *mux.Router, s *util.Server) {
	r.Handle("/signup", s.Handle(signupHandler)).Methods("GET").Name("signup")
	r.Handle("/signup", s.Handle(signupPostHandler)).Methods("POST")
}
Example #4
0
func registerHomeHandlers(r *mux.Router, s *util.Server) {
	r.Handle("/", s.Handle(homeHandler)).Methods("GET").Name("index")
	r.Handle("/env.js", http.HandlerFunc(envHandler)).Methods("GET").Name("env")
}