diff --git a/webadmin/src/js/setup.js b/webadmin/src/js/setup.js index 245613843..e209f024e 100644 --- a/webadmin/src/js/setup.js +++ b/webadmin/src/js/setup.js @@ -202,7 +202,7 @@ app.controller('CustomDomainController', [ '$scope', '$location', 'Wizard', func $scope.wizard = Wizard; - if (Wizard.dnsConfig === null) $location.path('/step4'); // not using custom domain + if (Wizard.dnsConfig.provider === 'caas') $location.path('/step4'); // not using custom domain }]); app.controller('FinishController', ['$scope', '$location', 'Wizard', 'Client', function ($scope, $location, Wizard, Client) { @@ -218,11 +218,6 @@ app.controller('FinishController', ['$scope', '$location', 'Wizard', 'Client', f Client.changeCloudronAvatar($scope.wizard.avatarBlob, function (error) { if (error) return console.error('Unable to set avatar.', error); - if ($scope.wizard.dnsConfig === null) { - window.location.href = '/'; - return; - } - Client.setDnsConfig($scope.wizard.dnsConfig, function (error) { if (error) return console.error('Unable to set dns config.', error); @@ -250,6 +245,10 @@ app.controller('SetupController', ['$scope', '$location', 'Client', 'Wizard', fu accessKeyId: null, secretAccessKey: null }; + } else { + Wizard.dnsConfig = { + provider: 'caas' + }; } Client.isServerFirstTime(function (error, isFirstTime) {