role_router.go 1.0 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("/role/", &controllers.RoleController{}, "Post:CreateRole")
	web.Router("/role/:roleId", &controllers.RoleController{}, "Put:UpdateRole")
	web.Router("/role/:roleId", &controllers.RoleController{}, "Get:GetRole")
	web.Router("/role/:roleId", &controllers.RoleController{}, "Delete:RemoveRole")
	web.Router("/role/search", &controllers.RoleController{}, "Post:ListRole")
	web.Router("/role/:roleId/related-user", &controllers.RoleController{}, "Get:GetRoleRelatedUsers")
	web.Router("/role/:roleId/access-menus", &controllers.RoleController{}, "Get:GetRoleAccessMenus")
	web.Router("/role/:roleId/access-menus", &controllers.RoleController{}, "Put:UpdateRoleAccessMenus")
	web.Router("/role/assign", &controllers.RoleController{}, "Post:AssginRoleToUsers")
	web.Router("/role/unassign", &controllers.RoleController{}, "Post:UnAssginRoleToUsers")
}