12345678910111213141516171819202122232425 |
- package admin
- import (
- "github.com/gin-gonic/gin"
- v1 "server/api/v1"
- "server/middleware"
- )
- type DeviceRouter struct{}
- func (dr *DeviceRouter) InitDeviceRouter(Router *gin.RouterGroup) {
- deviceRouter := Router.Group("device").Use(middleware.OperationRecord())
- deviceRouterWithoutRecord := Router.Group("device")
- deviceRouterApi := v1.ApiGroupApp.AdminApiGroup.DeviceApi
- {
- deviceRouter.POST("queryDeviceList", deviceRouterApi.QueryDeviceList)
- deviceRouter.POST("createDevice", deviceRouterApi.CreateDevice)
- deviceRouter.PUT("updateDevice", deviceRouterApi.UpdateDevice)
- deviceRouter.DELETE("deleteDevice", deviceRouterApi.DeleteDevice)
- }
- {
- deviceRouterWithoutRecord.GET("queryAllDevices", deviceRouterApi.QueryAllDevices)
- deviceRouterWithoutRecord.GET("generateDeviceFile", deviceRouterApi.GenerateDeviceFile)
- }
- }
|