Fix typo when using HttpSuccess instead of HttpError

This commit is contained in:
Johannes Zellner
2018-01-30 12:14:08 +01:00
parent 2c60c4eb82
commit 2745511e67
+1 -1
View File
@@ -274,7 +274,7 @@ function addList(req, res, next) {
mail.addList(req.params.domain, req.body.groupId, function (error) {
if (error && error.reason === MailError.NOT_FOUND) return next(new HttpError(404, error.message));
if (error && error.reason === MailError.ALREADY_EXISTS) return next(new HttpSuccess(409, 'list already exists'));
if (error && error.reason === MailError.ALREADY_EXISTS) return next(new HttpError(409, 'list already exists'));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(201, {}));