This commit is contained in:
2026-03-02 12:46:26 +08:00
parent 9fe6a88670
commit 6db59f1dea
61 changed files with 5432 additions and 1706 deletions

View File

@@ -7,6 +7,7 @@ import (
admin_agent "qnc-server/app/main/api/internal/handler/admin_agent"
admin_api "qnc-server/app/main/api/internal/handler/admin_api"
admin_auth "qnc-server/app/main/api/internal/handler/admin_auth"
admin_dashboard "qnc-server/app/main/api/internal/handler/admin_dashboard"
admin_feature "qnc-server/app/main/api/internal/handler/admin_feature"
admin_menu "qnc-server/app/main/api/internal/handler/admin_menu"
admin_notification "qnc-server/app/main/api/internal/handler/admin_notification"
@@ -177,6 +178,20 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
rest.WithPrefix("/api/v1/admin/auth"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
[]rest.Route{
{
Method: http.MethodGet,
Path: "/statistics",
Handler: admin_dashboard.AdminGetDashboardStatisticsHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/admin/dashboard"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
@@ -671,6 +686,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/level/privilege",
Handler: agent.GetLevelPrivilegeHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/order/agent",
Handler: agent.CheckOrderAgentHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/product_config",
@@ -736,6 +756,31 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/upgrade/subordinate",
Handler: agent.UpgradeSubordinateHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/whitelist/check",
Handler: agent.CheckFeatureWhitelistStatusHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/whitelist/features",
Handler: agent.GetWhitelistFeaturesHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/whitelist/list",
Handler: agent.GetWhitelistListHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/whitelist/offline",
Handler: agent.OfflineFeatureHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/whitelist/order/create",
Handler: agent.CreateWhitelistOrderHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/withdrawal/apply",