Exemple #1
0
func registerAccountHandlers(r *mux.Router, s *util.Server) {
	r.Handle("/dashboard", s.Handle(Protect(dashboardHandler))).Methods("GET").Name("dashboard")
}
Exemple #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")
}
Exemple #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")
}
Exemple #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")
}