package devices

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

type CameraRouter struct{}

func (c *CameraRouter) InitCameraRouter(Router *gin.RouterGroup) {
	cameraRouter := Router.Group("camera").Use(middleware.OperationRecord())
	cameraRouterWithoutRecord := Router.Group("camera")
	baseApi := v1.ApiGroupApp.DevicesApiGroup.CameraApi
	{
		cameraRouter.POST("addCamera", baseApi.AddCamera)      // 添加摄像头
		cameraRouter.PUT("updateCamera", baseApi.UpdateCamera) // 编辑摄像头
		cameraRouter.DELETE("delCamera", baseApi.DelCamera)    // 删除摄像头
	}
	{
		cameraRouterWithoutRecord.POST("getCameraList", baseApi.CameraList) // 分页获取网关列表
	}
}
