admin_user_router.go
405 字节
package routers
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/beego/middleware"
)
func init() {
adminRouter := beego.NewNamespace("/admin_user",
//验证权限
beego.NSBefore(middleware.AdminPermissionCheck(domain.PERMINSSION_ADMIN_USER)),
//其余的路由
//...
)
beego.AddNamespace(adminRouter)
}