mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix search route
This commit is contained in:
parent
51db6761c8
commit
caf38c94c7
@ -7,7 +7,7 @@ const scriptService = require('../../services/script');
|
|||||||
const searchService = require('../../services/search/services/search');
|
const searchService = require('../../services/search/services/search');
|
||||||
const noteRevisionService = require("../../services/note_revisions.js");
|
const noteRevisionService = require("../../services/note_revisions.js");
|
||||||
|
|
||||||
async function search(note) {
|
async function searchFromNoteInt(note) {
|
||||||
let searchResultNoteIds;
|
let searchResultNoteIds;
|
||||||
|
|
||||||
const searchScript = note.getRelationValue('searchScript');
|
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 [400, `Note ${req.params.noteId} is not a search note.`]
|
||||||
}
|
}
|
||||||
|
|
||||||
return await search(note);
|
return await searchFromNoteInt(note);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ACTION_HANDLERS = {
|
const ACTION_HANDLERS = {
|
||||||
@ -145,7 +145,7 @@ async function searchAndExecute(req) {
|
|||||||
return [400, `Note ${req.params.noteId} is not a search note.`]
|
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);
|
const actions = getActions(note);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user