router.go
814 字节
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.NSNamespace("/admin",
beego.NSRouter("/update", &controllers.AdminUserController{}, "POST:SaveAdminUser"),
beego.NSRouter("/detail", &controllers.AdminUserController{}, "POST:GetAdminUser"),
beego.NSRouter("/list", &controllers.AdminUserController{}, "POST:ListAdminUser"),
),
)
beego.AddNamespace(adminRouter)
}