Link entity migrated to Attribute, WIP

This commit is contained in:
zadam
2019-08-19 20:12:00 +02:00
parent fd9b79e115
commit 3cb421143f
22 changed files with 172 additions and 174 deletions

View File

@@ -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;
}