alai-server/backend/routes/player.go

17 lines
583 B
Go
Raw 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) {
2023-01-31 23:06:26 -03:00
router.GET("/player", controllers.ListPlayer)
router.GET("/player/:id", 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))
2023-01-31 09:35:56 -03:00
}