Do not show overwrite when creds are invalid
This commit is contained in:
+10
-2
@@ -181,8 +181,16 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
|
||||
if (!data.overwriteDns) {
|
||||
if (result.error || result.needsOverwrite) {
|
||||
$scope.appInstall.needsOverwrite = true;
|
||||
$scope.appInstall.error.location = result.error ? result.error.message : 'DNS Record already exists. Confirm that the domain is not in use for services external to Cloudron';
|
||||
if (result.error) {
|
||||
if (result.error.reason === ERROR.ACCESS_DENIED) {
|
||||
$scope.appInstall.error.location = 'DNS credentials for ' + data.domain + ' are invalid. Update it in Domains & Certs view';
|
||||
} else {
|
||||
$scope.appInstall.error.location = result.error.message;
|
||||
}
|
||||
} else {
|
||||
$scope.appInstall.error.location = 'DNS Record already exists. Confirm that the domain is not in use for services external to Cloudron';
|
||||
$scope.appInstall.needsOverwrite = true;
|
||||
}
|
||||
$scope.appInstall.busy = false;
|
||||
$scope.appInstallForm.location.$setPristine();
|
||||
$('#appInstallLocationInput').focus();
|
||||
|
||||
Reference in New Issue
Block a user