fix(server): sanitize import path ()

This commit is contained in:
Alex 2023-09-14 20:53:28 +07:00 committed by GitHub
parent 8a421eb778
commit 9c627920dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
import { Optional, toBoolean, toSanitized, UploadFieldName } from '@app/domain';
import { Optional, toBoolean, UploadFieldName } from '@app/domain';
import { ApiProperty } from '@nestjs/swagger';
import { Transform, Type } from 'class-transformer';
import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator';
@ -67,12 +67,10 @@ export class ImportAssetDto extends CreateAssetBase {
@IsString()
@IsNotEmpty()
@Transform(toSanitized)
assetPath!: string;
@IsString()
@Optional()
@IsNotEmpty()
@Transform(toSanitized)
sidecarPath?: string;
}