Load and save the relay settings

part of #188
This commit is contained in:
Girish Ramakrishnan
2017-06-27 13:45:49 -05:00
parent 60ae4972b0
commit 5088cb47d9
5 changed files with 141 additions and 96 deletions

View File

@@ -127,7 +127,7 @@ function setMailConfig(req, res, next) {
if (error && error.reason === SettingsError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200));
next(new HttpSuccess(202));
});
}
@@ -153,7 +153,7 @@ function setMailRelay(req, res, next) {
if (error && error.reason === SettingsError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200));
next(new HttpSuccess(202));
});
}
@@ -178,7 +178,7 @@ function setCatchAllAddress(req, res, next) {
if (error && error.reason === SettingsError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, {}));
next(new HttpSuccess(202));
});
}
@@ -191,7 +191,7 @@ function setCloudronAvatar(req, res, next) {
settings.setCloudronAvatar(avatar, function (error) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(202, {}));
next(new HttpSuccess(202));
});
}