organize user routes
This commit is contained in:
parent
c4880480ec
commit
b9b88eaf0e
@ -9,9 +9,11 @@ import (
|
||||
|
||||
func UserRoutes(router *httprouter.Router) {
|
||||
router.POST("/login", controllers.Login)
|
||||
router.GET("/users", middlewares.Authenticate(controllers.ListUsers))
|
||||
router.POST("/user", middlewares.Authenticate(controllers.CreateUser))
|
||||
router.GET("/user/:id", middlewares.Authenticate(controllers.GetUser))
|
||||
router.PATCH("/user/:id", middlewares.Authenticate(controllers.UpdateUser))
|
||||
router.GET("/auth", middlewares.Authenticate(controllers.AuthenticateUser))
|
||||
|
||||
router.GET("/users", middlewares.Authenticate(controllers.ListUsers))
|
||||
router.GET("/user/:id", middlewares.Authenticate(controllers.GetUser))
|
||||
router.POST("/user", middlewares.Authenticate(controllers.CreateUser))
|
||||
router.PATCH("/user/:id", middlewares.Authenticate(controllers.UpdateUser))
|
||||
router.DELETE("/user/:id", middlewares.Authenticate(controllers.DeleteUser))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user