protect the player endpoints behind authentication

This commit is contained in:
Chris Cromer 2023-02-01 12:48:52 -03:00
parent 8d05935bf3
commit 1c7c220944
Signed by: cromer
GPG Key ID: FA91071797BEEEC2

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