From c643dd73d2a12bacb386afec603e63f8b6a37e29 Mon Sep 17 00:00:00 2001 From: LeoMortari Date: Sun, 4 Jan 2026 03:51:02 -0300 Subject: [PATCH] Add validacao de qualidade na request --- src/modules/videos/dto/create-video-dto.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/videos/dto/create-video-dto.ts b/src/modules/videos/dto/create-video-dto.ts index b8245ee..9652622 100644 --- a/src/modules/videos/dto/create-video-dto.ts +++ b/src/modules/videos/dto/create-video-dto.ts @@ -1,6 +1,7 @@ import { Type } from 'class-transformer'; import { IsArray, + IsIn, IsNumber, IsOptional, IsString, @@ -51,6 +52,9 @@ export class CreateVideoDto { description?: string; @IsString() + @IsIn(['automatic', 'low', 'medium', 'high'], { + message: 'Qualidade deve ser "low", "medium" ou "high"', + }) @MaxLength(244) qualidade: string;