Add app install dns preflight check
This commit is contained in:
+5
-5
@@ -241,18 +241,18 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
if (overwriteDns) return callback();
|
||||
|
||||
Client.getDNSRecords(domain.domain, domain.subdomain, 'A', function (error, result) {
|
||||
if (error && (error.statusCode === 424 || error.statusCode === 200)) {
|
||||
if (error) return callback(error);
|
||||
if (result.error) {
|
||||
if (data.domain === domain.domain && data.location === domain.subdomain) {
|
||||
$scope.location.error.location = domain.domain + ' ' + error.message;
|
||||
$scope.location.error.location = domain.domain + ' ' + result.error.message;
|
||||
} else {
|
||||
$scope.location.error.alternateDomains = domain.domain + ' ' + error.message;
|
||||
$scope.location.error.alternateDomains = domain.domain + ' ' + result.error.message;
|
||||
}
|
||||
$scope.location.busy = false;
|
||||
return;
|
||||
}
|
||||
if (error) return callback(error);
|
||||
|
||||
if (result.length) $scope.location.domainCollisions.push(domain);
|
||||
if (result.needsOverwrite) $scope.location.domainCollisions.push(domain);
|
||||
|
||||
callback();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user