From fb4e52c0dec5ad26062d8a214de7f36353dea32f Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 3 Mar 2026 08:35:55 -0800 Subject: [PATCH] fix(contribution): add @Public() to getBatchRatios endpoint for service-to-service calls mining-service calls this endpoint without JWT token during DailySnapshot full sync, causing 401 Unauthorized. Mark it as public since it's internal data. Co-Authored-By: Claude Opus 4.6 --- .../src/api/controllers/snapshot.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts b/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts index fcd5ac18..d44ca834 100644 --- a/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts +++ b/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts @@ -7,6 +7,7 @@ import { BatchUserRatiosResponse, } from '../dto/response/snapshot.response'; import { CreateSnapshotRequest, GetBatchRatiosRequest } from '../dto/request/snapshot.request'; +import { Public } from '../../shared/guards/jwt-auth.guard'; @ApiTags('Snapshot') @Controller('snapshots') @@ -71,6 +72,7 @@ export class SnapshotController { } @Get(':date/ratios') + @Public() @ApiOperation({ summary: '批量获取用户算力占比' }) @ApiParam({ name: 'date', description: '快照日期 (YYYY-MM-DD)' }) @ApiResponse({ status: 200, type: BatchUserRatiosResponse })