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-02-01 12:48:52 -03:00
|
|
|
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
|
|
|
}
|