mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	links are now shown in the relation map as well
This commit is contained in:
		| @@ -99,7 +99,8 @@ async function getRelationMap(req) { | ||||
|         noteTitles: {}, | ||||
|         relations: [], | ||||
|         // relation name => mirror relation name | ||||
|         mirrorRelations: {} | ||||
|         mirrorRelations: {}, | ||||
|         links: [] | ||||
|     }; | ||||
|  | ||||
|     if (noteIds.length === 0) { | ||||
| @@ -129,6 +130,16 @@ 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