mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
option to erase notes immediately
This commit is contained in:
@@ -205,12 +205,17 @@ function setExpandedForSubtree(req) {
|
||||
|
||||
function deleteBranch(req) {
|
||||
const last = req.query.last === 'true';
|
||||
const eraseNotes = req.query.eraseNotes === 'true';
|
||||
const branch = becca.getBranch(req.params.branchId);
|
||||
const taskContext = TaskContext.getInstance(req.query.taskId, 'delete-notes');
|
||||
|
||||
const deleteId = utils.randomString(10);
|
||||
const noteDeleted = noteService.deleteBranch(branch, deleteId, taskContext);
|
||||
|
||||
if (eraseNotes) {
|
||||
noteService.eraseNotesWithDeleteId(deleteId);
|
||||
}
|
||||
|
||||
if (last) {
|
||||
taskContext.taskSucceeded();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user