device_router.go
598 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/port/beego/controllers"
)
func init() {
web.Router("/devices/", &controllers.DeviceController{}, "Post:CreateDevice")
web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Put:UpdateDevice")
web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Get:GetDevice")
web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Delete:RemoveDevice")
web.Router("/devices/", &controllers.DeviceController{}, "Get:ListDevice")
}