refactor(note-user-permission-entry-dto): 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:24:54 +01:00
parent b955faa983
commit 13284b26cb
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 10 additions and 10 deletions

View file

@ -17,11 +17,11 @@ import { UserInfoDto } from '../users/user-info.dto';
export class NoteUserPermissionEntryDto {
/**
* User this permission applies to
* Username of the User this permission applies to
*/
@ValidateNested()
@ApiProperty({ type: UserInfoDto })
user: UserInfoDto;
@IsString()
@ApiProperty()
username: string;
/**
* True if the user is allowed to edit the note