mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
refactoring + uploading attachments WIP
This commit is contained in:
@@ -2,16 +2,11 @@
|
||||
|
||||
const similarityService = require('../../becca/similarity');
|
||||
const becca = require("../../becca/becca");
|
||||
const NotFoundError = require("../../errors/not_found_error");
|
||||
|
||||
async function getSimilarNotes(req) {
|
||||
const noteId = req.params.noteId;
|
||||
|
||||
const note = becca.getNote(noteId);
|
||||
|
||||
if (!note) {
|
||||
throw new NotFoundError(`Note '${noteId}' not found.`);
|
||||
}
|
||||
const note = becca.getNoteOrThrow(noteId);
|
||||
|
||||
return await similarityService.findSimilarNotes(noteId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user