From bb4eb3832f5c7353431c829e5e4140419d20045b Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Thu, 20 Apr 2017 19:57:55 -0400 Subject: [PATCH] Some bugfixes to the previous commit. --- routes/reports.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/reports.js b/routes/reports.js index af15abce..8e660ba4 100644 --- a/routes/reports.js +++ b/routes/reports.js @@ -130,10 +130,10 @@ router.post('/create', passport.parseForm, passport.csrfProtection, (req, res) = return res.redirect('/reports/create?' + tools.queryParams(data)); } - reportProcessor.start(id); - - req.flash('success', util.format(_('Report ā€œ%sā€ created'), data.name)); - res.redirect('/reports'); + reportProcessor.start(id, () => { + req.flash('success', util.format(_('Report ā€œ%sā€ created'), data.name)); + res.redirect('/reports'); + }); }); }); });