@@ -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;
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user