product_router.go
616 字节
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("/products/", &controllers.ProductController{}, "Post:CreateProduct")
web.Router("/products/:productId", &controllers.ProductController{}, "Put:UpdateProduct")
web.Router("/products/:productId", &controllers.ProductController{}, "Get:GetProduct")
web.Router("/products/:productId", &controllers.ProductController{}, "Delete:RemoveProduct")
web.Router("/products/", &controllers.ProductController{}, "Get:ListProduct")
}