From 73381a4376eb6190c676e2235d3c916946cfe313 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 11 Jan 2026 09:04:21 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dcontribution-service?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Kong: /api/v2/contribution -> /api/v1/contributions (strip_path) - mining-app: 添加/accounts前缀匹配controller路径 Co-Authored-By: Claude Opus 4.5 --- backend/api-gateway/kong.yml | 7 ++++--- frontend/mining-app/lib/core/network/api_endpoints.dart | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/api-gateway/kong.yml b/backend/api-gateway/kong.yml index 0f699108..78360121 100644 --- a/backend/api-gateway/kong.yml +++ b/backend/api-gateway/kong.yml @@ -277,18 +277,19 @@ services: # --------------------------------------------------------------------------- # Contribution Service 2.0 - 算力服务 + # 服务使用 /api/v1/contributions 前缀 # --------------------------------------------------------------------------- - name: contribution-service-v2 - url: http://192.168.1.111:3020 + url: http://192.168.1.111:3020/api/v1/contributions routes: - name: contribution-v2-api paths: - /api/v2/contribution - strip_path: false + strip_path: true - name: contribution-v2-health paths: - /api/v2/contribution/health - strip_path: false + strip_path: true # --------------------------------------------------------------------------- # Mining Service 2.0 - 挖矿服务 diff --git a/frontend/mining-app/lib/core/network/api_endpoints.dart b/frontend/mining-app/lib/core/network/api_endpoints.dart index c9fb7250..44a85d35 100644 --- a/frontend/mining-app/lib/core/network/api_endpoints.dart +++ b/frontend/mining-app/lib/core/network/api_endpoints.dart @@ -34,9 +34,9 @@ class ApiEndpoints { static String transfer(String accountSequence) => '/api/v2/trading/accounts/$accountSequence/transfer'; - // Contribution Service 2.0 (Kong路由: /api/v2/contribution) + // Contribution Service 2.0 (Kong路由: /api/v2/contribution -> /api/v1/contributions) static String contribution(String accountSequence) => - '/api/v2/contribution/$accountSequence'; + '/api/v2/contribution/accounts/$accountSequence'; static String contributionRecords(String accountSequence) => - '/api/v2/contribution/$accountSequence/records'; + '/api/v2/contribution/accounts/$accountSequence/records'; }