fix(mpc-service): 添加 /api/v1 前缀到 coordinator-client 路径

session-coordinator 的 API 路由注册在 /api/v1/sessions 下,
但 coordinator-client 调用的是 /sessions(404 错误)。

修复所有端点路径:
- /sessions/join -> /api/v1/sessions/join
- /sessions/report-completion -> /api/v1/sessions/report-completion
- /sessions/{id}/status -> /api/v1/sessions/{id}/status
- /sessions/report-failure -> /api/v1/sessions/report-failure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Developer 2025-12-03 21:06:06 -08:00
parent cd4fba96ed
commit e4abc7eb83
1 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,7 @@ export class MPCCoordinatorClient implements OnModuleInit {
this.logger.log(`Joining session: ${request.sessionId}`);
try {
const response = await this.client.post('/sessions/join', {
const response = await this.client.post('/api/v1/sessions/join', {
session_id: request.sessionId,
party_id: request.partyId,
join_token: request.joinToken,
@ -127,7 +127,7 @@ export class MPCCoordinatorClient implements OnModuleInit {
this.logger.log(`Reporting completion for session: ${request.sessionId}`);
try {
await this.client.post('/sessions/report-completion', {
await this.client.post('/api/v1/sessions/report-completion', {
session_id: request.sessionId,
party_id: request.partyId,
public_key: request.publicKey,
@ -147,7 +147,7 @@ export class MPCCoordinatorClient implements OnModuleInit {
this.logger.log(`Getting status for session: ${sessionId}`);
try {
const response = await this.client.get(`/sessions/${sessionId}/status`);
const response = await this.client.get(`/api/v1/sessions/${sessionId}/status`);
return {
sessionId: response.data.session_id,
@ -170,7 +170,7 @@ export class MPCCoordinatorClient implements OnModuleInit {
this.logger.log(`Reporting failure for session: ${sessionId}`);
try {
await this.client.post('/sessions/report-failure', {
await this.client.post('/api/v1/sessions/report-failure', {
session_id: sessionId,
party_id: partyId,
error_message: errorMessage,