f
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
admin_product "tydata-server/app/main/api/internal/handler/admin_product"
|
||||
admin_promotion "tydata-server/app/main/api/internal/handler/admin_promotion"
|
||||
admin_query "tydata-server/app/main/api/internal/handler/admin_query"
|
||||
admin_query_whitelist "tydata-server/app/main/api/internal/handler/admin_query_whitelist"
|
||||
admin_role "tydata-server/app/main/api/internal/handler/admin_role"
|
||||
admin_role_api "tydata-server/app/main/api/internal/handler/admin_role_api"
|
||||
admin_user "tydata-server/app/main/api/internal/handler/admin_user"
|
||||
@@ -603,6 +604,30 @@ 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.AdminQueryWhitelistOpLogListHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1/admin/query-whitelist"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
|
||||
Reference in New Issue
Block a user