fixes, getting rid of resizing for now

This commit is contained in:
azivner
2018-10-25 14:01:03 +02:00
parent 4a5a63d7b4
commit 41fca4c4f3
3 changed files with 43 additions and 44 deletions

View File

@@ -105,11 +105,11 @@ async function getRelationMap(req) {
const questionMarks = noteIds.map(noteId => '?').join(',');
(await repository.getEntities(`SELECT * FROM notes WHERE noteId IN (${questionMarks})`, noteIds))
(await repository.getEntities(`SELECT * FROM notes WHERE isDeleted = 0 AND noteId IN (${questionMarks})`, noteIds))
.forEach(note => resp.noteTitles[note.noteId] = note.title);
// FIXME: this actually doesn't take into account inherited relations! But maybe it is better this way?
resp.relations = (await repository.getEntities(`SELECT * FROM attributes WHERE type = 'relation' AND noteId IN (${questionMarks})`, noteIds))
resp.relations = (await repository.getEntities(`SELECT * FROM attributes WHERE isDeleted = 0 AND type = 'relation' AND noteId IN (${questionMarks})`, noteIds))
.map(relation => { return {
sourceNoteId: relation.noteId,
targetNoteId: relation.value,