Skip to content

Build your personal knowledge base with Trilium Notes

fix protect branch

azivner8c54b62f0726
diff --git a/src/routes/api/notes.js b/src/routes/api/notes.js
index 099a679742..1f4412f530 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);