Consistently type properties as optional

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-04-29 18:29:12 +02:00
parent bc08493f89
commit e217b30d26
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 15 additions and 7 deletions

View file

@ -31,7 +31,7 @@ export class NoteMetadataDto {
@IsString()
@IsOptional()
@ApiPropertyOptional()
alias: string;
alias?: string;
/**
* Title of the note
@ -72,8 +72,9 @@ export class NoteMetadataDto {
* User that last edited the note
*/
@ValidateNested()
@ApiProperty({ type: UserInfoDto })
updateUser: UserInfoDto;
@ApiPropertyOptional({ type: UserInfoDto })
@IsOptional()
updateUser?: UserInfoDto;
/**
* Counts how many times the published note has been viewed