Skip to content

Commit 83a6339

Browse files
committed
IOT-1172: Prevent create/update iot device 'deviceModelId' from not being a number
1 parent 15520ae commit 83a6339

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/entities/dto/create-iot-device.dto.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ApiProperty } from "@nestjs/swagger";
22
import { Type } from "class-transformer";
33
import {
4+
IsInt,
45
IsOptional,
56
IsString,
67
Max,
@@ -63,6 +64,7 @@ export class CreateIoTDeviceDto {
6364

6465
@ApiProperty({ required: false })
6566
@IsOptional()
67+
@IsInt()
6668
deviceModelId?: number;
6769

6870
@ApiProperty({ required: false })

0 commit comments

Comments
 (0)