setting dashboard domain now only updates dashboard domain (and not mail)
part of #721
This commit is contained in:
@@ -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, {}));
|
||||
|
||||
Reference in New Issue
Block a user