diff --git a/lib/apiserver/routers/smstools-config.js b/lib/apiserver/routers/smstools-config.js index f007609..2cee951 100644 --- a/lib/apiserver/routers/smstools-config.js +++ b/lib/apiserver/routers/smstools-config.js @@ -16,8 +16,8 @@ const queuesAndProviders = require('../../smstools-config/queues-and-providers') const router = express.Router(); module.exports = router; -function pageIndex(req, res) { - const configString = smstoolsConfigCreator(); +async function pageIndex(req, res) { + const configString = await smstoolsConfigCreator(); res.json({ dirty: smstoolsConfig.config.dirty, config: smstoolsConfig.config, @@ -28,7 +28,7 @@ function pageIndex(req, res) { } function pageGenerate(req, res) { - res.end(smstoolsConfigCreator()); + res.end(await smstoolsConfigCreator()); } async function pageModemList(req, res) {