menu_router.go 1.2 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("/menus/", &controllers.MenuController{}, "Post:CreateMenu")
	web.Router("/menus/:menuId", &controllers.MenuController{}, "Put:UpdateMenu")
	web.Router("/menus/:menuId", &controllers.MenuController{}, "Get:GetMenu")
	web.Router("/menus/:menuId", &controllers.MenuController{}, "Delete:RemoveMenu")
	web.Router("/menus/", &controllers.MenuController{}, "Get:ListMenu")
	web.Router("/menus/search", &controllers.MenuController{}, "Post:SearchMenu")

	web.Router("/v1/web/menus/", &controllers.MenuController{}, "Post:CreateMenu")
	web.Router("/v1/web/menus/:menuId", &controllers.MenuController{}, "Put:UpdateMenu")
	web.Router("/v1/web/menus/:menuId", &controllers.MenuController{}, "Get:GetMenu")
	web.Router("/v1/web/menus/:menuId", &controllers.MenuController{}, "Delete:RemoveMenu")
	web.Router("/v1/web/menus/search", &controllers.MenuController{}, "Get:ListMenu")
	web.Router("/v1/web/menus/search", &controllers.MenuController{}, "Post:SearchMenu")

	web.Router("/v1/web/common/dictionary/search", &controllers.CommonController{}, "Post:DictionarySearch")
}