Add validacao de qualidade na request
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
import {
|
import {
|
||||||
IsArray,
|
IsArray,
|
||||||
|
IsIn,
|
||||||
IsNumber,
|
IsNumber,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsString,
|
IsString,
|
||||||
@@ -51,6 +52,9 @@ export class CreateVideoDto {
|
|||||||
description?: string;
|
description?: string;
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
|
@IsIn(['automatic', 'low', 'medium', 'high'], {
|
||||||
|
message: 'Qualidade deve ser "low", "medium" ou "high"',
|
||||||
|
})
|
||||||
@MaxLength(244)
|
@MaxLength(244)
|
||||||
qualidade: string;
|
qualidade: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user