mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
Link entity migrated to Attribute, WIP
This commit is contained in:
@@ -114,8 +114,7 @@ async function getRelationMap(req) {
|
||||
noteTitles: {},
|
||||
relations: [],
|
||||
// relation name => inverse relation name
|
||||
inverseRelations: {},
|
||||
links: []
|
||||
inverseRelations: {}
|
||||
};
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
@@ -145,16 +144,6 @@ async function getRelationMap(req) {
|
||||
}
|
||||
}
|
||||
|
||||
resp.links = (await repository.getEntities(`SELECT * FROM links WHERE isDeleted = 0 AND noteId IN (${questionMarks})`, noteIds))
|
||||
.filter(link => noteIds.includes(link.targetNoteId))
|
||||
.map(link => {
|
||||
return {
|
||||
linkId: link.linkId,
|
||||
sourceNoteId: link.noteId,
|
||||
targetNoteId: link.targetNoteId
|
||||
}
|
||||
});
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user