diff --git a/lib/api.js b/lib/api.js index 4dc5561c8..170787367 100644 --- a/lib/api.js +++ b/lib/api.js @@ -61,7 +61,7 @@ const processRequest = apiKey => async (req, res) => { (...data) => { errors.push(Object.assign({}, ...data)); }, - data => { + async data => { if (errors.length > 0) sendJSONresult(errors, [], [], res, {}); else { @@ -69,7 +69,7 @@ const processRequest = apiKey => async (req, res) => { if (options.url) meta.url = options.url; else meta.file = options.file; try { - options2 = processParams(meta, undefined, { + options2 = await processParams(meta, undefined, { allowUnknownParams: true, }); } catch (err) {