mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			397 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			397 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
"use strict";
 | 
						|
 | 
						|
import type { Request } from "express";
 | 
						|
 | 
						|
import similarityService from "../../becca/similarity.js";
 | 
						|
import becca from "../../becca/becca.js";
 | 
						|
 | 
						|
async function getSimilarNotes(req: Request) {
 | 
						|
    const noteId = req.params.noteId;
 | 
						|
 | 
						|
    const _note = becca.getNoteOrThrow(noteId);
 | 
						|
 | 
						|
    return await similarityService.findSimilarNotes(noteId);
 | 
						|
}
 | 
						|
 | 
						|
export default {
 | 
						|
    getSimilarNotes
 | 
						|
};
 |