package devices

import (
	"github.com/gin-gonic/gin"
	v1 "server/api/v1"
	"server/middleware"
)

type ScreensRouter struct{}

func (s *ScreensRouter) InitScreensRouter(Router *gin.RouterGroup) {
	screensRouter := Router.Group("screens").Use(middleware.OperationRecord())
	screensRouterWithoutRecord := Router.Group("screens")

	baseApi := v1.ApiGroupApp.DevicesApiGroup.ScreensApi

	{
		screensRouter.POST("addScreens", baseApi.AddScreens)      // 增加LED
		screensRouter.PUT("updateScreens", baseApi.UpdateScreens) // 编辑
		screensRouter.DELETE("delScreens", baseApi.DelScreens)    // 删除
	}

	{
		screensRouterWithoutRecord.POST("getScreensList", baseApi.GetScreensList) //获取显示屏列表
	}
}
