setting dashboard domain now only updates dashboard domain (and not mail)

part of #721
This commit is contained in:
Girish Ramakrishnan
2020-08-15 22:53:05 -07:00
parent d1e14ed691
commit 1eef239392
3 changed files with 7 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ exports = module.exports = {
checkForUpdates: checkForUpdates,
getLogs: getLogs,
getLogStream: getLogStream,
setDashboardAndMailDomain: setDashboardAndMailDomain,
updateDashboardDomain,
prepareDashboardDomain: prepareDashboardDomain,
renewCerts: renewCerts,
getServerIp: getServerIp,
@@ -274,10 +274,10 @@ function getLogStream(req, res, next) {
});
}
function setDashboardAndMailDomain(req, res, next) {
function updateDashboardDomain(req, res, next) {
if (!req.body.domain || typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be a string'));
cloudron.setDashboardAndMailDomain(req.body.domain, auditSource.fromRequest(req), function (error) {
cloudron.updateDashboardDomain(req.body.domain, auditSource.fromRequest(req), function (error) {
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(204, {}));