delete note fixes

This commit is contained in:
zadam
2021-05-08 23:31:20 +02:00
parent 84246fd197
commit 9afea492db
9 changed files with 46 additions and 45 deletions

View File

@@ -81,10 +81,10 @@ function getRecentChanges(req) {
if (change.current_isDeleted) {
const deleteId = change.current_deleteId;
const undeletedParentBranches = noteService.getUndeletedParentBranches(change.noteId, deleteId);
const undeletedParentBranchIds = noteService.getUndeletedParentBranchIds(change.noteId, deleteId);
// note (and the subtree) can be undeleted if there's at least one undeleted parent (whose branch would be undeleted by this op)
change.canBeUndeleted = undeletedParentBranches.length > 0;
change.canBeUndeleted = undeletedParentBranchIds.length > 0;
}
}

View File

@@ -2,7 +2,7 @@
const scriptService = require('../../services/script');
const attributeService = require('../../services/attributes');
const repository = require('../../services/repository');
const becca = require('../../services/becca/becca');
const syncService = require('../../services/sync');
async function exec(req) {