fix protect branch

This commit is contained in:
azivner 2018-04-19 22:18:19 -04:00
parent 85eb50ed0f
commit 8c54b62f07

View file

@ -47,7 +47,7 @@ async function sortNotes(req) {
async function protectBranch(req) { async function protectBranch(req) {
const noteId = req.params.noteId; const noteId = req.params.noteId;
const note = repository.getNote(noteId); const note = await repository.getNote(noteId);
const protect = !!parseInt(req.params.isProtected); const protect = !!parseInt(req.params.isProtected);
await noteService.protectNoteRecursively(note, protect); await noteService.protectNoteRecursively(note, protect);