diff --git a/src/mailer.js b/src/mailer.js index 1a557d7f0..8d99a27f4 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -282,12 +282,11 @@ function sendCrashNotification(program, context) { enqueue(mailOptions); } -function sendFeedback(user, type, subject, description, callback) { +function sendFeedback(user, type, subject, description) { assert.strictEqual(typeof user, 'object'); assert.strictEqual(typeof type, 'string'); assert.strictEqual(typeof subject, 'string'); assert.strictEqual(typeof description, 'string'); - assert.strictEqual(typeof callback, 'function'); assert(type === exports.FEEDBACK_TYPE_TICKET || type === exports.FEEDBACK_TYPE_FEEDBACK); diff --git a/src/routes/cloudron.js b/src/routes/cloudron.js index 6c386fde2..2c9f985d2 100644 --- a/src/routes/cloudron.js +++ b/src/routes/cloudron.js @@ -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, {})); }