company_router.go 1.1 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/port/beego/controllers"
)

func init() {
	web.Router("/company/", &controllers.CompanyController{}, "Post:CreateCompany")
	web.Router("/company/:companyId", &controllers.CompanyController{}, "Put:UpdateCompany")
	web.Router("/company/:companyId", &controllers.CompanyController{}, "Get:GetCompany")
	web.Router("/company/:companyId", &controllers.CompanyController{}, "Delete:RemoveCompany")
	web.Router("/company/search", &controllers.CompanyController{}, "Post:ListCompany")
	web.Router("/company/:companyId/customize-menus/", &controllers.CompanyController{}, "Get:ListCompanyCustomizeMenus")
	web.Router("/company/:companyId/customize-menus", &controllers.CompanyController{}, "Put:UpdateCompanyCustomizeMenus")

	// 适配web
	web.Router("/v1/web/menus/search", &controllers.CompanyController{}, "Post:SearchCompanyCustomizeMenus")
	web.Router("/v1/web/menus", &controllers.CompanyController{}, "Put:AdapterUpdateCompanyCustomizeMenus")
}