From 8c54b62f072624fdae43bc80bee2d6f361a8f13e Mon Sep 17 00:00:00 2001 From: azivner Date: Thu, 19 Apr 2018 22:18:19 -0400 Subject: [PATCH] fix protect branch --- src/routes/api/notes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);