Instantly share code, notes, and snippets.

Embed
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