From 109986ba49ba79f95e29772c94c355d066ae8328 Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 15 Jan 2026 06:22:30 -0800 Subject: [PATCH] fix(mining-wallet-service): move share-pool-balance route before :type param route NestJS routes are matched in order, so the parameterized :type route was capturing 'share-pool-balance' before it could reach the public endpoint, causing 401 errors. Co-Authored-By: Claude Opus 4.5 --- .../api/controllers/pool-account.controller.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/services/mining-wallet-service/src/api/controllers/pool-account.controller.ts b/backend/services/mining-wallet-service/src/api/controllers/pool-account.controller.ts index e9aea8c8..08f45c9c 100644 --- a/backend/services/mining-wallet-service/src/api/controllers/pool-account.controller.ts +++ b/backend/services/mining-wallet-service/src/api/controllers/pool-account.controller.ts @@ -34,6 +34,14 @@ export class PoolAccountController { return this.poolAccountService.findAll(); } + @Get('share-pool-balance') + @Public() + @ApiOperation({ summary: '获取积分股池总余量' }) + @ApiResponse({ status: 200, description: '积分股池A+B的总余量' }) + async getSharePoolTotalBalance() { + return this.poolAccountService.getSharePoolTotalBalance(); + } + @Get('stats') @AdminOnly() @ApiOperation({ summary: '获取池账户统计' }) @@ -104,14 +112,6 @@ export class PoolAccountController { }); } - @Get('share-pool-balance') - @Public() - @ApiOperation({ summary: '获取积分股池总余量' }) - @ApiResponse({ status: 200, description: '积分股池A+B的总余量' }) - async getSharePoolTotalBalance() { - return this.poolAccountService.getSharePoolTotalBalance(); - } - @Post('burn') @AdminOnly() @ApiOperation({ summary: '销毁到黑洞池' })