added possibility to search by attached script returning note ids + some refactorings

This commit is contained in:
zadam
2019-03-20 22:28:54 +01:00
parent 9ca680f842
commit fc13e1fa6a
21 changed files with 125 additions and 62 deletions

View File

@@ -7,12 +7,14 @@ const log = require('./log');
async function executeNote(note, apiParams) {
if (!note.isJavaScript() || note.getScriptEnv() !== 'backend' || !note.isContentAvailable) {
log.info(`Cannot execute note ${note.noteId}`);
return;
}
const bundle = await getScriptBundle(note);
await executeBundle(bundle, apiParams);
return await executeBundle(bundle, apiParams);
}
async function executeNoteNoException(note, apiParams) {