Fix error display on the convert user widget
This commit is contained in:
parent
b50600cde8
commit
7ea02c186a
1 changed files with 5 additions and 8 deletions
|
@ -39,6 +39,10 @@ angular.module('quay').directive('convertUserToOrg', function () {
|
||||||
|
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
|
|
||||||
|
var errorHandler = ApiService.errorDisplay(function() {
|
||||||
|
$scope.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
'adminUser': $scope.org.adminUser,
|
'adminUser': $scope.org.adminUser,
|
||||||
'adminPassword': $scope.org.adminPassword,
|
'adminPassword': $scope.org.adminPassword,
|
||||||
|
@ -49,14 +53,7 @@ angular.module('quay').directive('convertUserToOrg', function () {
|
||||||
CookieService.putPermanent('quay.namespace', $scope.user.username);
|
CookieService.putPermanent('quay.namespace', $scope.user.username);
|
||||||
UserService.load();
|
UserService.load();
|
||||||
$location.path('/');
|
$location.path('/');
|
||||||
}, function(resp) {
|
}, errorHandler);
|
||||||
$scope.loading = false;
|
|
||||||
if (resp.data.reason == 'invaliduser') {
|
|
||||||
$('#invalidadminModal').modal({});
|
|
||||||
} else {
|
|
||||||
$('#cannotconvertModal').modal({});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue