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

@ -375,7 +375,7 @@ export class NotesService {
return {
owner: owner ? owner.username : null,
sharedToUsers: userPermissions.map((noteUserPermission) => ({
user: this.usersService.toUserDto(noteUserPermission.user),
username: noteUserPermission.user.username,
canEdit: noteUserPermission.canEdit,
})),
sharedToGroups: groupPermissions.map((noteGroupPermission) => ({