If domain does not exist, go back to domain selection
This commit is contained in:
@@ -824,6 +824,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
resetDnsRecords();
|
||||
|
||||
Client.getMailConfigForDomain(domainName, function (error, mailConfig) {
|
||||
if (error && error.statusCode === 404) return $location.path('/email');
|
||||
if (error) {
|
||||
$scope.refreshBusy = false;
|
||||
return console.error(error);
|
||||
@@ -936,7 +937,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
});
|
||||
|
||||
Client.getDomains(function (error, result) {
|
||||
if (error) return console.error('Unable to get view domain.', error);
|
||||
if (error) return console.error('Unable to list domains.', error);
|
||||
|
||||
$scope.domain = result.filter(function (d) { return d.domain === domainName; })[0];
|
||||
$scope.adminDomain = result.filter(function (d) { return d.domain === $scope.config.adminDomain; })[0];
|
||||
|
||||
Reference in New Issue
Block a user