package router

import (
	"fonchain-fiee/pkg/middleware"
	"fonchain-fiee/pkg/service"
	serviceCast "fonchain-fiee/pkg/service/cast"
	"github.com/gin-gonic/gin"
)

func MediaRouter(r *gin.RouterGroup) {
	//noAuth := r.Group("")
	auth := r.Group("")
	auth.Use(middleware.CheckWebLogin(service.AccountProvider))
	media := auth.Group("media")
	{
		media.POST("user-list", serviceCast.MediaUserList)
		media.POST("unbind-manager", serviceCast.UnbindManager)
		media.POST("bind-manager", serviceCast.BindManager)
		media.POST("update-account", serviceCast.UpdateMediaAccount)
	}

	work := auth.Group("work")
	{
		work.POST("update-work-image", serviceCast.UpdateWorkImage)
		work.POST("update-work-video", serviceCast.UpdateWorkVideo)
		work.POST("list", serviceCast.WorkList)
		work.POST("detail", serviceCast.WorkDetail)
	}
}
