make game and user use the same structure for all of its endpoints
This commit is contained in:
parent
e2f3a26c88
commit
9ebce5f1d9
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func GameRoutes(router *httprouter.Router) {
|
||||
router.GET("/games", middlewares.Authenticate(controllers.ListGames))
|
||||
router.GET("/game", middlewares.Authenticate(controllers.ListGames))
|
||||
router.GET("/game/:id", middlewares.Authenticate(controllers.GetGame))
|
||||
router.POST("/game", controllers.CreateGame)
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ func UserRoutes(router *httprouter.Router) {
|
||||
router.POST("/login", controllers.Login)
|
||||
router.GET("/auth", middlewares.Authenticate(controllers.AuthenticateUser))
|
||||
|
||||
router.GET("/users", middlewares.Authenticate(controllers.ListUsers))
|
||||
router.GET("/user", 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))
|
||||
|
Loading…
Reference in New Issue
Block a user