mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
fixed saved search refresh
This commit is contained in:
@@ -22,11 +22,12 @@ async function searchFromNote(req) {
|
||||
return [400, `Note ${req.params.noteId} is not search note.`]
|
||||
}
|
||||
|
||||
let searchString;
|
||||
let searchResultNoteIds;
|
||||
|
||||
try {
|
||||
const searchScript = note.getRelationValue('searchScript');
|
||||
const searchString = note.getLabelValue('searchString');
|
||||
searchString = note.getLabelValue('searchString');
|
||||
|
||||
if (searchScript) {
|
||||
searchResultNoteIds = await searchFromRelation(note, 'searchScript');
|
||||
@@ -60,6 +61,8 @@ async function searchFromNote(req) {
|
||||
searchResultNoteIds = searchResultNoteIds.slice(0, 200);
|
||||
}
|
||||
|
||||
console.log(`Search with query "${searchString}" with results: ${searchResultNoteIds}`);
|
||||
|
||||
return searchResultNoteIds;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user