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