mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
syncification
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
const noteCacheService = require('../../services/note_cache/note_cache_service');
|
||||
const repository = require('../../services/repository');
|
||||
|
||||
async function getSimilarNotes(req) {
|
||||
function getSimilarNotes(req) {
|
||||
const noteId = req.params.noteId;
|
||||
|
||||
const note = await repository.getNote(noteId);
|
||||
const note = repository.getNote(noteId);
|
||||
|
||||
if (!note) {
|
||||
return [404, `Note ${noteId} not found.`];
|
||||
}
|
||||
|
||||
const results = await noteCacheService.findSimilarNotes(noteId);
|
||||
const results = noteCacheService.findSimilarNotes(noteId);
|
||||
|
||||
return results
|
||||
.filter(note => note.noteId !== noteId);
|
||||
|
||||
Reference in New Issue
Block a user