note cache refactoring WIP

This commit is contained in:
zadam
2020-05-16 22:11:09 +02:00
parent 78ea0b4ba9
commit e3071e630a
9 changed files with 102 additions and 111 deletions

View File

@@ -18,7 +18,7 @@ async function getAutocomplete(req) {
results = await getRecentNotes(activeNoteId);
}
else {
results = await noteCacheService.findNotesWithFulltext(query);
results = await noteCacheService.findNotesForAutocomplete(query);
}
const msTaken = Date.now() - timestampStarted;
@@ -57,10 +57,9 @@ async function getRecentNotes(activeNoteId) {
const title = noteCacheService.getNoteTitleForPath(rn.notePath.split('/'));
return {
path: rn.notePath,
pathTitle: title,
highlightedTitle: title,
noteTitle: noteCacheService.getNoteTitleFromPath(rn.notePath)
notePath: rn.notePath,
notePathTitle: title,
highlightedNotePathTitle: utils.escapeHtml(title)
};
});
}