package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"

	"go-admin/app/operate/apis"
	"go-admin/common/middleware"
)

func init() {
	routerCheckRole = append(routerCheckRole, registerOrgTeamMatchRouter)
}

// registerOrgTeamMatchRouter
func registerOrgTeamMatchRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	api := apis.OrgTeamMatch{}
	r := v1.Group("/org-team-match").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	{
		r.GET("", api.GetPage)
		r.GET("/get-players", api.GetPlayers)
		r.GET("/get-players-is-set", api.GetPlayersIsSet)
		r.GET("/info", api.GetInfo)
		r.PUT("/update-players", api.UpdatePlayers)
	}
}
