mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-13 15:25:39 +01:00
refactor models
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsDefined, ValidateNested } from 'class-validator';
|
||||
import { MultiPartFileDto } from './multipart.dto';
|
||||
import { IsMultiPartFile } from './multipart.validator';
|
||||
|
||||
// A validation class for form based file upload of an image
|
||||
export class ImageUploadDto {
|
||||
@IsDefined()
|
||||
@ValidateNested()
|
||||
@Type(() => MultiPartFileDto)
|
||||
@IsMultiPartFile()
|
||||
image: MultiPartFileDto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user