protect/unprotect tree reports progress via notifications

This commit is contained in:
zadam
2019-10-19 09:58:18 +02:00
parent 82bbf4173b
commit 00bb1236ce
4 changed files with 42 additions and 5 deletions

View File

@@ -102,7 +102,11 @@ async function protectSubtree(req) {
const note = await repository.getNote(noteId);
const protect = !!parseInt(req.params.isProtected);
await noteService.protectNoteRecursively(note, protect);
const taskContext = new TaskContext(utils.randomString(10), 'protect-notes', {protect});
await noteService.protectNoteRecursively(note, protect, taskContext);
taskContext.taskSucceeded();
}
async function setNoteTypeMime(req) {