device_router.go
683 字节
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")
web.Router("/devices/search", &controllers.DeviceController{}, "Post:SearchDevice")
}