diff --git a/src/routes/api/notes.js b/src/routes/api/notes.js index 099a67974..1f4412f53 100644 --- a/src/routes/api/notes.js +++ b/src/routes/api/notes.js @@ -47,7 +47,7 @@ async function sortNotes(req) { async function protectBranch(req) { const noteId = req.params.noteId; - const note = repository.getNote(noteId); + const note = await repository.getNote(noteId); const protect = !!parseInt(req.params.isProtected); await noteService.protectNoteRecursively(note, protect);