fix backlinks in day note subtree, fixes #3158

This commit is contained in:
zadam
2022-10-22 15:01:10 +02:00
parent 63eb22c7ac
commit 14fb9c76b0
4 changed files with 26 additions and 22 deletions

View File

@@ -305,21 +305,6 @@ function uploadModifiedFile(req) {
note.setContent(fileContent);
}
function getBacklinkCount(req) {
const {noteId} = req.params;
const note = becca.getNote(noteId);
if (!note) {
return [404, "Not found"];
}
else {
return {
count: note.getTargetRelations().filter(note => !note.getNote().hasLabel('excludeFromNoteMap')).length
};
}
}
module.exports = {
getNote,
updateNoteContent,
@@ -334,6 +319,5 @@ module.exports = {
duplicateSubtree,
eraseDeletedNotesNow,
getDeleteNotesPreview,
uploadModifiedFile,
getBacklinkCount
uploadModifiedFile
};