setAdmin -> setDashboardDomain

This commit is contained in:
Girish Ramakrishnan
2018-12-08 18:18:45 -08:00
parent 76677e0aea
commit cfb68a0511
4 changed files with 8 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ exports = module.exports = {
getLogs: getLogs,
getLogStream: getLogStream,
getStatus: getStatus,
setAdmin: setAdmin
setDashboardDomain: setDashboardDomain
};
var appstore = require('../appstore.js'),
@@ -174,10 +174,10 @@ function getLogStream(req, res, next) {
});
}
function setAdmin(req, res, next) {
function setDashboardDomain(req, res, next) {
if (!req.body.domain || typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be a string'));
cloudron.setAdmin(req.body.domain, function (error) {
cloudron.setDashboardDomain(req.body.domain, function (error) {
if (error && error.reason === CloudronError.BAD_FIELD) return next(new HttpError(404, error.message));
if (error) return next(new HttpError(500, error));