alai-server/backend/routes/player.go

17 lines
635 B
Go
Raw Permalink Normal View History

2023-01-31 09:35:56 -03:00
package routes
import (
"git.cromer.cl/Proyecto-Titulo/alai-server/backend/controllers"
"git.cromer.cl/Proyecto-Titulo/alai-server/backend/middlewares"
"github.com/julienschmidt/httprouter"
)
func PlayerRoutes(router *httprouter.Router) {
router.GET("/player", middlewares.Authenticate(controllers.ListPlayer))
router.GET("/player/:id", middlewares.Authenticate(controllers.GetPlayer))
2023-01-31 23:06:26 -03:00
router.POST("/player", middlewares.Authenticate(controllers.CreatePlayer))
router.PATCH("/player/:id", middlewares.Authenticate(controllers.UpdatePlayer))
router.DELETE("/player/:id", middlewares.Authenticate(controllers.DeletePlayer))
2023-01-31 09:35:56 -03:00
}