Skip to content

Instantly share code, notes, and snippets.

Created Jun 28, 2018
What would you like to do?
func RegisterRoutes(srv *gin.Engine) {
srv.GET("/", handlers.IndexFn)
srv.GET("/login", handlers.LoginFn)
srv.POST("/login", handlers.LoginFn)
srv.GET("/register", handlers.RegisterFn)
srv.POST("/register", handlers.RegisterFn)
auth := srv.Group("", handlers.Authenticated)
auth.GET("/user/:name", handlers.ProfileFn)
auth.GET("/logout", handlers.LogoutFn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment