note cache refactoring

This commit is contained in:
zadam
2020-05-13 14:42:16 +02:00
parent b07accfd9d
commit 7992f32d34
7 changed files with 210 additions and 164 deletions

View File

@@ -12,7 +12,7 @@ async function getSimilarNotes(req) {
return [404, `Note ${noteId} not found.`];
}
const results = await noteCacheService.findSimilarNotes(note.title);
const results = await noteCacheService.findSimilarNotes(noteId);
return results
.filter(note => note.noteId !== noteId);
@@ -20,4 +20,4 @@ async function getSimilarNotes(req) {
module.exports = {
getSimilarNotes
};
};