fix(server): 路由 id 使用 ParseIntPipe,限制分页与批量数组上限
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { ArrayNotEmpty, IsArray, IsInt, Min } from 'class-validator';
|
||||
import { ArrayMaxSize, ArrayNotEmpty, IsArray, IsInt, Min } from 'class-validator';
|
||||
|
||||
export class BatchIdsDto {
|
||||
@IsArray()
|
||||
@ArrayNotEmpty()
|
||||
@ArrayMaxSize(500)
|
||||
@IsInt({ each: true })
|
||||
@Min(1, { each: true })
|
||||
ids: number[];
|
||||
|
||||
Reference in New Issue
Block a user