2024-04-06 23:09:32 +03:00
|
|
|
"use strict";
|
|
|
|
|
2025-01-09 18:36:24 +02:00
|
|
|
import type { Request } from "express";
|
2024-04-06 23:09:32 +03:00
|
|
|
|
2024-07-18 21:35:17 +03:00
|
|
|
import similarityService from "../../becca/similarity.js";
|
|
|
|
import becca from "../../becca/becca.js";
|
2024-04-06 23:09:32 +03:00
|
|
|
|
|
|
|
async function getSimilarNotes(req: Request) {
|
|
|
|
const noteId = req.params.noteId;
|
|
|
|
|
2025-03-06 23:21:47 +01:00
|
|
|
const _note = becca.getNoteOrThrow(noteId);
|
2024-04-06 23:09:32 +03:00
|
|
|
|
|
|
|
return await similarityService.findSimilarNotes(noteId);
|
|
|
|
}
|
|
|
|
|
2024-07-18 21:42:44 +03:00
|
|
|
export default {
|
2024-04-06 23:09:32 +03:00
|
|
|
getSimilarNotes
|
|
|
|
};
|