Add validacao de qualidade na request
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user