Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix search route
zadamcaf38c94c7e2
diff --git a/src/routes/api/search.js b/src/routes/api/search.jsindex 1129b40d0b..d20aa0617e 100644--- a/src/routes/api/search.js+++ b/src/routes/api/search.js@@ -7,7 +7,7 @@ const scriptService = require('../../services/script');const searchService = require('../../services/search/services/search');const noteRevisionService = require("../../services/note_revisions.js");-async function search(note) {+async function searchFromNoteInt(note) {let searchResultNoteIds;const searchScript = note.getRelationValue('searchScript');@@ -53,7 +53,7 @@ async function searchFromNote(req) {return [400, `Note ${req.params.noteId} is not a search note.`]}- return await search(note);+ return await searchFromNoteInt(note);}const ACTION_HANDLERS = {@@ -145,7 +145,7 @@ async function searchAndExecute(req) {return [400, `Note ${req.params.noteId} is not a search note.`]}- const searchResultNoteIds = await search(note);+ const searchResultNoteIds = await searchFromNoteInt(note);const actions = getActions(note);