diff --git a/src/api/public/notes/notes.controller.ts b/src/api/public/notes/notes.controller.ts index 1caa35d35..0960fb7b4 100644 --- a/src/api/public/notes/notes.controller.ts +++ b/src/api/public/notes/notes.controller.ts @@ -221,7 +221,7 @@ export class NotesController { if (!this.permissionsService.isOwner(req.user, note)) { throw new UnauthorizedException('Updating note denied!'); } - return await this.noteService.toNotePermissionsDto( + return this.noteService.toNotePermissionsDto( this.noteService.updateNotePermissions(note, updateDto), ); } catch (e) { diff --git a/src/notes/notes.service.ts b/src/notes/notes.service.ts index d278297a2..42ac32bd0 100644 --- a/src/notes/notes.service.ts +++ b/src/notes/notes.service.ts @@ -295,12 +295,11 @@ export class NotesService { } /** - * @async * Build NotePermissionsDto from a note. * @param {Note} note - the note to use * @return {NotePermissionsDto} the built NotePermissionDto */ - async toNotePermissionsDto(note: Note): Promise { + toNotePermissionsDto(note: Note): Promise { return { owner: this.usersService.toUserDto(note.owner), sharedToUsers: note.userPermissions.map((noteUserPermission) => ({ @@ -331,7 +330,7 @@ export class NotesService { editedBy: note.authorColors.map( (authorColor) => authorColor.user.userName, ), - permissions: await this.toNotePermissionsDto(note), + permissions: this.toNotePermissionsDto(note), tags: this.toTagList(note), updateTime: (await this.getLatestRevision(note)).createdAt, updateUser: this.usersService.toUserDto(