mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
fix backlinks in day note subtree, fixes #3158
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user