package team

import (
	"hyapp-admin-server/internal/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterRoutes(protected *gin.RouterGroup, h *Handler) {
	protected.GET("/teams", middleware.RequirePermission("team:view"), h.ListTeams)
	protected.POST("/teams", middleware.RequirePermission("team:create"), h.CreateTeam)
	protected.PATCH("/teams/:team_id", middleware.RequirePermission("team:update"), h.UpdateTeam)
	protected.GET("/teams/:team_id/users", middleware.RequirePermission("user:view"), h.ListTeamUsers)
}
