mailer functions only enqueue, respond immediately

This commit is contained in:
Johannes Zellner
2015-08-04 15:39:14 +02:00
parent c8f6973312
commit d22e0f0483
2 changed files with 4 additions and 6 deletions
+3 -4
View File
@@ -167,8 +167,7 @@ function feedback(req, res, next) {
if (typeof req.body.subject !== 'string') return next(new HttpError(400, 'subject must be string'));
if (typeof req.body.description !== 'string') return next(new HttpError(400, 'description must be string'));
mailer.sendFeedback(req.user, req.body.type, req.body.subject, req.body.description, function (error) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(201, {}));
});
mailer.sendFeedback(req.user, req.body.type, req.body.subject, req.body.description);
next(new HttpSuccess(201, {}));
}