mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
Don't await non-Promises
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
f3f0360a95
commit
2b14ad92cd
2 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ export class MeController {
|
|||
@UseGuards(TokenAuthGuard)
|
||||
@Get('notes')
|
||||
async getMyNotes(@Request() req): Promise<NoteMetadataDto[]> {
|
||||
const notes = await this.notesService.getUserNotes(req.user);
|
||||
const notes = this.notesService.getUserNotes(req.user);
|
||||
return await Promise.all(
|
||||
notes.map((note) => this.notesService.toNoteMetadataDto(note)),
|
||||
);
|
||||
|
|
|
@ -221,7 +221,7 @@ export class NotesController {
|
|||
throw new UnauthorizedException('Updating note denied!');
|
||||
}
|
||||
return await this.noteService.toNotePermissionsDto(
|
||||
await this.noteService.updateNotePermissions(note, updateDto),
|
||||
this.noteService.updateNotePermissions(note, updateDto),
|
||||
);
|
||||
} catch (e) {
|
||||
if (e instanceof NotInDBError) {
|
||||
|
|
Loading…
Reference in a new issue