From 12032b905fd7c501fadb99f55e467c05d7348d76 Mon Sep 17 00:00:00 2001 From: Developer Date: Wed, 3 Dec 2025 16:49:49 -0800 Subject: [PATCH] =?UTF-8?q?fix(identity-service):=20=E4=BF=AE=E5=A4=8D=20M?= =?UTF-8?q?PC=20=E6=9C=8D=E5=8A=A1=E8=B0=83=E7=94=A8=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: identity-service 调用 mpc-service 返回 404 原因: mpc-service 有全局前缀 /api/v1,但调用路径缺少此前缀 修复: - mpc-client.service.ts: 添加 /api/v1 前缀到 MPC API 调用路径 - kong.yml: 添加 /api/v1/mpc-party 路由 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/api-gateway/kong.yml | 4 ++++ .../src/infrastructure/external/mpc/mpc-client.service.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/api-gateway/kong.yml b/backend/api-gateway/kong.yml index 15b3b331..5ae3921d 100644 --- a/backend/api-gateway/kong.yml +++ b/backend/api-gateway/kong.yml @@ -115,6 +115,10 @@ services: paths: - /api/v1/mpc strip_path: false + - name: mpc-party-api + paths: + - /api/v1/mpc-party + strip_path: false # --------------------------------------------------------------------------- # Leaderboard Service - 排行榜服务 diff --git a/backend/services/identity-service/src/infrastructure/external/mpc/mpc-client.service.ts b/backend/services/identity-service/src/infrastructure/external/mpc/mpc-client.service.ts index bb52bdd8..0c214717 100644 --- a/backend/services/identity-service/src/infrastructure/external/mpc/mpc-client.service.ts +++ b/backend/services/identity-service/src/infrastructure/external/mpc/mpc-client.service.ts @@ -107,7 +107,7 @@ export class MpcClientService { // 调用 mpc-service 的 keygen 同步接口 const response = await firstValueFrom( this.httpService.post( - `${this.mpcServiceUrl}/mpc-party/keygen/participate-sync`, + `${this.mpcServiceUrl}/api/v1/mpc-party/keygen/participate-sync`, { sessionId: request.sessionId, partyId: 'server-party', @@ -157,7 +157,7 @@ export class MpcClientService { // 调用 mpc-service 的 signing 同步接口 const response = await firstValueFrom( this.httpService.post( - `${this.mpcServiceUrl}/mpc-party/signing/participate-sync`, + `${this.mpcServiceUrl}/api/v1/mpc-party/signing/participate-sync`, { sessionId: request.sessionId, partyId: 'server-party',