make game and user use the same structure for all of its endpoints

This commit is contained in:
Chris Cromer 2023-02-01 12:52:26 -03:00 committed by Martin Araneda
parent e2f3a26c88
commit 9ebce5f1d9
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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))