浏览代码

pr feedback

martabal 1 年之前
父节点
当前提交
abaaa4def6
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      server/src/domain/asset/dto/asset.dto.ts

+ 5 - 0
server/src/domain/asset/dto/asset.dto.ts

@@ -11,6 +11,7 @@ import {
   IsNotEmpty,
   IsPositive,
   IsString,
+  Max,
   Min,
   ValidateIf,
 } from 'class-validator';
@@ -204,6 +205,8 @@ export class AssetBulkUpdateDto extends BulkIdsDto {
   longitude?: number;
 
   @Optional()
+  @Min(1)
+  @Max(8)
   @IsInt()
   @Type(() => Number)
   orientation?: number;
@@ -237,6 +240,8 @@ export class UpdateAssetDto {
   longitude?: number;
 
   @Optional()
+  @Min(1)
+  @Max(8)
   @IsInt()
   @Type(() => Number)
   orientation?: number;