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

View file

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

View file

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