mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
undelete note WIP
This commit is contained in:
@@ -55,12 +55,15 @@ async function deleteNote(req) {
|
||||
const taskId = req.query.taskId;
|
||||
const last = req.query.last === 'true';
|
||||
|
||||
// note how deleteId is separate from taskId - single taskId produces separate deleteId for each "top level" deleted note
|
||||
const deleteId = utils.randomString(10);
|
||||
|
||||
const note = await repository.getNote(noteId);
|
||||
|
||||
const taskContext = TaskContext.getInstance(taskId, 'delete-notes');
|
||||
|
||||
for (const branch of await note.getBranches()) {
|
||||
await noteService.deleteBranch(branch, taskContext);
|
||||
await noteService.deleteBranch(branch, deleteId, taskContext);
|
||||
}
|
||||
|
||||
if (last) {
|
||||
|
||||
Reference in New Issue
Block a user