refactor(note-metadata): do not embed User objects

This is part of an effort to consistently not embed User objects
in API responses. Usernames are returned instead.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-01-16 22:54:53 +01:00
parent 96ed5f3cc8
commit 08f97209ec
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
5 changed files with 8 additions and 11 deletions

View file

@ -77,10 +77,10 @@ export class NoteMetadataDto {
/**
* User that last edited the note
*/
@ValidateNested()
@ApiPropertyOptional({ type: UserInfoDto })
@IsString()
@ApiPropertyOptional()
@IsOptional()
updateUser: UserInfoDto | null;
updateUsername: string | null;
/**
* Counts how many times the published note has been viewed