diff --git a/webadmin/src/js/main.js b/webadmin/src/js/main.js index 546339735..b170408a0 100644 --- a/webadmin/src/js/main.js +++ b/webadmin/src/js/main.js @@ -103,7 +103,8 @@ angular.module('Application').controller('MainController', ['$scope', '$route', Client.getStatus(function (error, status) { if (error) return $scope.error(error); - if (!status.activated) { + if (!status.adminFqdn) { + console.log('You have on domain, redirecting', status.configState.configured); window.location.href = status.configState.configured ? '/setup.html' : '/setupdns.html'; return; } diff --git a/webadmin/src/js/setup.js b/webadmin/src/js/setup.js index 03fecc308..18fa81932 100644 --- a/webadmin/src/js/setup.js +++ b/webadmin/src/js/setup.js @@ -66,17 +66,17 @@ app.controller('SetupController', ['$scope', '$http', 'Client', function ($scope return; } - if (status.activated) { - window.location.href = '/'; - return; - } - // if we don't have a domain yet, first go to domain setup if (!status.adminFqdn) { window.location.href = '/setupdns.html'; return; } + if (status.activated) { + window.location.href = '/'; + return; + } + if (status.provider === 'caas') { if (!search.setupToken) { window.location.href = '/error.html?errorCode=2';