fix(server): 路由 id 使用 ParseIntPipe,限制分页与批量数组上限
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user