From 3a10e56eeb8345b211670f4ab42b6f570deef512 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 6 Jan 2020 22:33:26 +0100 Subject: [PATCH] wait for door lock charges calculation --- routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index e35c18d..bd3c65e 100644 --- a/routes/index.js +++ b/routes/index.js @@ -44,6 +44,6 @@ router.get('/integration/report/practiceSummary/:year', getPracticeSummaryReport // temporary route, manually trigger door lock charge calculations -router.get('/calculate', (req, res) => { calculateDoorLockCharges(); res.send();}); +router.get('/calculate', (req, res) => { calculateDoorLockCharges().then(() => res.send('Done')).catch((err) => res.send('Error \r\n', err));}); module.exports = router;