mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
统一应用路由前缀规则
This commit is contained in:
@@ -7,18 +7,18 @@ package router
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/controller/api/member"
|
||||
"hotgo/internal/controller/api/pay"
|
||||
"hotgo/internal/controller/api/user"
|
||||
"hotgo/internal/service"
|
||||
"hotgo/utility/simple"
|
||||
)
|
||||
|
||||
// Api 前台路由
|
||||
func Api(ctx context.Context, group *ghttp.RouterGroup) {
|
||||
prefix := g.Cfg().MustGet(ctx, "router.api.prefix", "/api")
|
||||
group.Group(prefix.String(), func(group *ghttp.RouterGroup) {
|
||||
group.Group(simple.RouterPrefix(ctx, consts.AppApi), func(group *ghttp.RouterGroup) {
|
||||
group.Bind(
|
||||
user.Hello,
|
||||
pay.Notify, // 支付异步通知
|
||||
|
||||
Reference in New Issue
Block a user