package devices

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

type RadarRouter struct{}

func (r *RadarRouter) InitRadarRouter(Router *gin.RouterGroup, RouterPub *gin.RouterGroup) {
	radarRouter := Router.Group("radar").Use(middleware.OperationRecord())
	radarRouterWithoutRecord := Router.Group("radar")

	//apiPublicRouterWithoutRecord := RouterPub.Group("radar")
	baseApi := v1.ApiGroupApp.DevicesApiGroup.RadarApi
	{
		radarRouter.PUT("updateRadar", baseApi.UpdateRadar) //编辑雷达
		radarRouter.POST("addRadar", baseApi.AddRadar)      //添加雷达
		radarRouter.DELETE("delRadar", baseApi.DelRadar)    // 删除雷达
	}
	{
		radarRouterWithoutRecord.POST("getRadarList", baseApi.RadarList) // 分页获取网关列表
	}

}
