mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
19 lines
391 B
TypeScript
19 lines
391 B
TypeScript
![]() |
"use strict";
|
||
|
|
||
|
import { Request } from "express";
|
||
|
|
||
|
import similarityService = require('../../becca/similarity');
|
||
|
import becca = require('../../becca/becca');
|
||
|
|
||
|
async function getSimilarNotes(req: Request) {
|
||
|
const noteId = req.params.noteId;
|
||
|
|
||
|
const note = becca.getNoteOrThrow(noteId);
|
||
|
|
||
|
return await similarityService.findSimilarNotes(noteId);
|
||
|
}
|
||
|
|
||
|
export = {
|
||
|
getSimilarNotes
|
||
|
};
|