修复产品修改、删除
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
auth "tianyuan-api/apps/gateway/internal/handler/auth"
|
||||
base "tianyuan-api/apps/gateway/internal/handler/base"
|
||||
product "tianyuan-api/apps/gateway/internal/handler/product"
|
||||
topup "tianyuan-api/apps/gateway/internal/handler/topup"
|
||||
user "tianyuan-api/apps/gateway/internal/handler/user"
|
||||
userProduct "tianyuan-api/apps/gateway/internal/handler/userProduct"
|
||||
whitelistr "tianyuan-api/apps/gateway/internal/handler/whitelistr"
|
||||
@@ -79,6 +80,25 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/console/product"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor, serverCtx.EntAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/aliTopUp",
|
||||
Handler: topup.AliTopUpHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/aliTopUpCallback",
|
||||
Handler: topup.AliTopUpCallbackHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/console/topupfmghnjx"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||
@@ -111,6 +131,20 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/userProductList",
|
||||
Handler: userProduct.GetUserProductListHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/console/user-product"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor, serverCtx.EntAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
@@ -122,11 +156,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/userProductDel/:id",
|
||||
Handler: userProduct.DeleteUserProductHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/userProductList",
|
||||
Handler: userProduct.GetUserProductListHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/console/user-product"),
|
||||
|
||||
Reference in New Issue
Block a user