router.go
1.1 KB
package routers
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/port/beego/controllers"
)
func init() {
adminRouter := beego.NewNamespace("/v1",
beego.NSNamespace("/auth",
beego.NSRouter("/login", &controllers.AdminLoginController{}, "POST:Login"),
beego.NSRouter("/captcha-init", &controllers.AdminLoginController{}, "POST:CaptchaInit"),
beego.NSRouter("/profile", &controllers.AdminLoginController{}, "POST:AdminpPofile"),
beego.NSRouter("/pwd-update", &controllers.AdminLoginController{}, "POST:PwdUpdate"),
),
beego.NSNamespace("/admin",
beego.NSRouter("/update", &controllers.AdminUserController{}, "POST:SaveAdminUser"),
beego.NSRouter("/detail", &controllers.AdminUserController{}, "POST:GetAdminUser"),
beego.NSRouter("/list", &controllers.AdminUserController{}, "POST:ListAdminUser"),
beego.NSRouter("/forbidden", &controllers.AdminUserController{}, "POST:ForbiddenAdminUser"),
beego.NSRouter("/permission", &controllers.AdminUserController{}, "POST:BeforeEditAdminUser"),
),
)
beego.AddNamespace(adminRouter)
}