fix(mining-admin-service): 修复 manual-mining 分页参数 NaN 问题

NestJS transform 会将缺失的 query 参数转为 NaN,
而 NaN ?? 1 仍然是 NaN。改用 Number(page) || 1 确保默认值生效。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-02 02:37:55 -08:00
parent 3bce996dd3
commit fe6c1b3fce
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ export class ManualMiningController {
@Query('page') page?: number,
@Query('pageSize') pageSize?: number,
) {
return this.manualMiningService.getRecords(page ?? 1, pageSize ?? 20);
return this.manualMiningService.getRecords(Number(page) || 1, Number(pageSize) || 20);
}
@Get('records/:accountSequence')