NoteMetadataDto: Rename permission to permissions

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
This commit is contained in:
David Mehren 2020-10-03 14:45:04 +02:00
parent fe5f9bc9c3
commit ad676ce6ff
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ export class HistoryService {
description: 'Very descriptive text.',
editedBy: [],
id: 'foobar-barfoo',
permission: {
permissions: {
owner: {
displayName: 'foo',
userName: 'fooUser',
@ -59,7 +59,7 @@ export class HistoryService {
description: 'Very descriptive text.',
editedBy: [],
id: 'foobar-barfoo',
permission: {
permissions: {
owner: {
displayName: 'foo',
userName: 'fooUser',

View file

@ -32,5 +32,5 @@ export class NoteMetadataDto {
@ValidateNested()
editedBy: UserInfoDto['userName'][];
@ValidateNested()
permission: NotePermissionsDto;
permissions: NotePermissionsDto;
}

View file

@ -37,7 +37,7 @@ export class NotesService {
description: 'Very descriptive text.',
editedBy: [],
id: 'foobar-barfoo',
permission: {
permissions: {
owner: {
displayName: 'foo',
userName: 'fooUser',
@ -108,7 +108,7 @@ export class NotesService {
description: NoteUtils.parseDescription(note),
editedBy: note.authorColors.map(authorColor => authorColor.user.userName),
// TODO: Extract into method
permission: {
permissions: {
owner: this.usersService.toUserDto(note.owner),
sharedToUsers: note.userPermissions.map(noteUserPermission => ({
user: this.usersService.toUserDto(noteUserPermission.user),