mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
option to erase notes immediately
This commit is contained in:
@@ -63,6 +63,7 @@ function updateNote(req) {
|
||||
function deleteNote(req) {
|
||||
const noteId = req.params.noteId;
|
||||
const taskId = req.query.taskId;
|
||||
const eraseNotes = req.query.eraseNotes === 'true';
|
||||
const last = req.query.last === 'true';
|
||||
|
||||
// note how deleteId is separate from taskId - single taskId produces separate deleteId for each "top level" deleted note
|
||||
@@ -76,6 +77,10 @@ function deleteNote(req) {
|
||||
noteService.deleteBranch(branch, deleteId, taskContext);
|
||||
}
|
||||
|
||||
if (eraseNotes) {
|
||||
noteService.eraseNotesWithDeleteId(deleteId);
|
||||
}
|
||||
|
||||
if (last) {
|
||||
taskContext.taskSucceeded();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user