protect the player endpoints behind authentication

This commit is contained in:
Chris Cromer 2023-02-01 12:48:52 -03:00 committed by Martin Araneda
parent 48cd36d0a8
commit 8caec6a46d

View File

@ -8,8 +8,8 @@ import (
)
func PlayerRoutes(router *httprouter.Router) {
router.GET("/player", controllers.ListPlayer)
router.GET("/player/:id", controllers.GetPlayer)
router.GET("/player", middlewares.Authenticate(controllers.ListPlayer))
router.GET("/player/:id", middlewares.Authenticate(controllers.GetPlayer))
router.POST("/player", middlewares.Authenticate(controllers.CreatePlayer))
router.PATCH("/player/:id", middlewares.Authenticate(controllers.UpdatePlayer))
router.DELETE("/player/:id", middlewares.Authenticate(controllers.DeletePlayer))