From abaaa4def6e70e6cdfab863db85b3cd8ea95f74d Mon Sep 17 00:00:00 2001 From: martabal <74269598+martabal@users.noreply.github.com> Date: Sat, 2 Dec 2023 14:36:15 +0100 Subject: [PATCH] pr feedback --- server/src/domain/asset/dto/asset.dto.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/domain/asset/dto/asset.dto.ts b/server/src/domain/asset/dto/asset.dto.ts index 6cc5ec5bb..693dbe6d6 100644 --- a/server/src/domain/asset/dto/asset.dto.ts +++ b/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;