router.go
1.7 KB
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.Router("auth/login", &controllers.AuthController{}, "Post:Login")
nsV1.Router("auth/smsCode", &controllers.AuthController{}, "Post:SmsCode")
nsV1.Router("auth/accessToken", &controllers.AuthController{}, "Post:AccessToken")
nsV1.Router("auth/refreshToken", &controllers.AuthController{}, "Post:RefreshToken")
nsV1.Router("auth/revoke", &controllers.AuthController{}, "Post:Revoke")
nsV1.Router("auth/updateDevice", &controllers.AuthController{}, "Post:UpdateDevice")
nsV1.Router("user/userInfo", &controllers.UserController{}, "Post:UserInfo")
nsV1.Router("user/checkSmsCode", &controllers.UserController{}, "Post:CheckSmsCode")
nsV1.Router("user/changePhone", &controllers.UserController{}, "Post:ChangePhone")
nsV1.Router("user/resetPassword", &controllers.UserController{}, "Post:ResetPassword")
nsV1.Router("user/changePassword", &controllers.UserController{}, "Post:ChangePassword")
nsV1.Router("order/statistics", &controllers.OrderController{}, "Post:Statistics")
nsV1.Router("order/details", &controllers.OrderController{}, "Post:OrderDetail")
nsV1.Router("order/list", &controllers.OrderController{}, "Post:OrderList")
nsV1.Router("dividend/statistics", &controllers.DividendController{}, "Post:DividendStatistics")
nsV1.Router("dividend/orders", &controllers.DividendController{}, "Post:DividendOrders")
beego.AddNamespace(nsV1)
}