...
|
...
|
@@ -3,11 +3,10 @@ package routers |
|
|
import (
|
|
|
"github.com/astaxie/beego"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/controllers"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/middleware"
|
|
|
)
|
|
|
|
|
|
func init() {
|
|
|
nsV1 := beego.NewNamespace("v1", beego.NSBefore(middleware.CheckJWTToken)) //beego.NSNamespace("auth", beego.NSInclude(&controllers.AuthController{}))
|
|
|
nsV1 := beego.NewNamespace("v1") //, beego.NSBefore(middleware.CheckJWTToken)
|
|
|
nsV1.Router("/auth/login", &controllers.AuthController{}, "Post:Login")
|
|
|
nsV1.Router("/auth/smsCode", &controllers.AuthController{}, "Post:SmsCode")
|
|
|
nsV1.Router("/auth/accessToken", &controllers.AuthController{}, "Post:AccessToken")
|
...
|
...
|
@@ -43,7 +42,7 @@ func init() { |
|
|
}
|
|
|
|
|
|
func InitV2() {
|
|
|
nsV2 := beego.NewNamespace("v2", beego.NSBefore(middleware.CheckJWTToken)) // ,
|
|
|
nsV2 := beego.NewNamespace("v2") // ,, beego.NSBefore(middleware.CheckJWTToken)
|
|
|
nsV2.Router("/auth/login", &controllers.AuthController{}, "Post:LoginV2")
|
|
|
nsV2.Router("/user/userInfo", &controllers.UserController{}, "Post:UserInfoV2")
|
|
|
beego.AddNamespace(nsV2)
|
...
|
...
|
|