feat: add name property to share (#462)

* add name property to share

* refactor: run formatter

* tests: adapt system tests

* tests: adapt second system test
This commit is contained in:
Elias Schneider
2024-05-03 18:12:26 +03:00
committed by GitHub
parent 0e12ba87bc
commit b717663b5c
13 changed files with 59 additions and 39 deletions

View File

@@ -18,6 +18,10 @@ export class CreateShareDTO {
@Length(3, 50)
id: string;
@Length(3, 30)
@IsOptional()
name: string;
@IsString()
expiration: string;

View File

@@ -6,6 +6,9 @@ export class ShareDTO {
@Expose()
id: string;
@Expose()
name?: string;
@Expose()
expiration: Date;
@@ -23,6 +26,9 @@ export class ShareDTO {
@Expose()
hasPassword: boolean;
@Expose()
size: number;
from(partial: Partial<ShareDTO>) {
return plainToClass(ShareDTO, partial, { excludeExtraneousValues: true });
}