fix(server): 路由 id 使用 ParseIntPipe,限制分页与批量数组上限

This commit is contained in:
2026-08-07 16:38:03 +08:00
parent 899d2dde5b
commit 5b5ffb5b9e
14 changed files with 96 additions and 58 deletions

View File

@@ -3,6 +3,7 @@ import {
Get,
Put,
Param,
ParseIntPipe,
Query,
Req,
Sse,
@@ -74,7 +75,7 @@ export class NotificationsController {
@Put(':id/read')
async markRead(
@Param('id') id: string,
@Param('id', ParseIntPipe) id: number,
@Req() req: AuthenticatedRequest,
) {
await this.service.markRead(+id, req.user.id);