From 069fbee3a66d949c53bc86d2f4071469e9909768 Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 20 Oct 2021 21:27:47 +0200 Subject: [PATCH] allow async scripts in runOnBackend(), fixes #2243 --- src/routes/api/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/api/script.js b/src/routes/api/script.js index 11cc025f9..b591307df 100644 --- a/src/routes/api/script.js +++ b/src/routes/api/script.js @@ -5,11 +5,11 @@ const attributeService = require('../../services/attributes'); const becca = require('../../becca/becca'); const syncService = require('../../services/sync'); -function exec(req) { +async function exec(req) { try { const {body} = req; - const result = scriptService.executeScript( + const result = await scriptService.executeScript( body.script, body.params, body.startNoteId,