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 <noreply@anthropic.com>
This commit is contained in:
parent
85c20adb0b
commit
fb4e52c0de
|
|
@ -7,6 +7,7 @@ import {
|
||||||
BatchUserRatiosResponse,
|
BatchUserRatiosResponse,
|
||||||
} from '../dto/response/snapshot.response';
|
} from '../dto/response/snapshot.response';
|
||||||
import { CreateSnapshotRequest, GetBatchRatiosRequest } from '../dto/request/snapshot.request';
|
import { CreateSnapshotRequest, GetBatchRatiosRequest } from '../dto/request/snapshot.request';
|
||||||
|
import { Public } from '../../shared/guards/jwt-auth.guard';
|
||||||
|
|
||||||
@ApiTags('Snapshot')
|
@ApiTags('Snapshot')
|
||||||
@Controller('snapshots')
|
@Controller('snapshots')
|
||||||
|
|
@ -71,6 +72,7 @@ export class SnapshotController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get(':date/ratios')
|
@Get(':date/ratios')
|
||||||
|
@Public()
|
||||||
@ApiOperation({ summary: '批量获取用户算力占比' })
|
@ApiOperation({ summary: '批量获取用户算力占比' })
|
||||||
@ApiParam({ name: 'date', description: '快照日期 (YYYY-MM-DD)' })
|
@ApiParam({ name: 'date', description: '快照日期 (YYYY-MM-DD)' })
|
||||||
@ApiResponse({ status: 200, type: BatchUserRatiosResponse })
|
@ApiResponse({ status: 200, type: BatchUserRatiosResponse })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue