mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
fixes to delete notifications
This commit is contained in:
@@ -75,14 +75,20 @@ async function updateNote(req) {
|
||||
|
||||
async function deleteNote(req) {
|
||||
const noteId = req.params.noteId;
|
||||
const taskId = req.query.taskId;
|
||||
const last = req.query.last === 'true';
|
||||
|
||||
const note = await repository.getNote(noteId);
|
||||
|
||||
const taskContext = TaskContext.getInstance(req.query.taskId, 'delete-notes');
|
||||
const taskContext = TaskContext.getInstance(taskId, 'delete-notes');
|
||||
|
||||
for (const branch of await note.getBranches()) {
|
||||
await noteService.deleteBranch(branch, taskContext);
|
||||
}
|
||||
|
||||
if (last) {
|
||||
await taskContext.taskSucceeded();
|
||||
}
|
||||
}
|
||||
|
||||
async function sortNotes(req) {
|
||||
|
||||
Reference in New Issue
Block a user