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'); + }); }); }); });