addf
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
admin_product "tyc-server/app/main/api/internal/handler/admin_product"
|
||||
admin_promotion "tyc-server/app/main/api/internal/handler/admin_promotion"
|
||||
admin_query "tyc-server/app/main/api/internal/handler/admin_query"
|
||||
admin_query_whitelist "tyc-server/app/main/api/internal/handler/admin_query_whitelist"
|
||||
admin_role "tyc-server/app/main/api/internal/handler/admin_role"
|
||||
admin_role_api "tyc-server/app/main/api/internal/handler/admin_role_api"
|
||||
admin_user "tyc-server/app/main/api/internal/handler/admin_user"
|
||||
@@ -607,6 +608,33 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/v1/admin/query"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 追加查询白名单产品编码
|
||||
Method: http.MethodPost,
|
||||
Path: "/append",
|
||||
Handler: admin_query_whitelist.AdminQueryWhitelistAppendHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 创建查询白名单规则
|
||||
Method: http.MethodPost,
|
||||
Path: "/create",
|
||||
Handler: admin_query_whitelist.AdminQueryWhitelistCreateHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 查询白名单操作记录列表
|
||||
Method: http.MethodGet,
|
||||
Path: "/op-log/list",
|
||||
Handler: admin_query_whitelist.AdminGetQueryWhitelistOpLogListHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1/admin/query-whitelist"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
|
||||
Reference in New Issue
Block a user