add error handling of admin of org call

This commit is contained in:
John Mitchell
2016-04-05 10:33:03 -04:00
parent 6153016937
commit 83a656653d

View File

@@ -182,6 +182,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
Rest.get() Rest.get()
.success(function(data) { .success(function(data) {
$scope.canShareCredential = (data.count) ? true : false; $scope.canShareCredential = (data.count) ? true : false;
}).error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
}); });
} }
@@ -342,6 +344,8 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
Rest.get() Rest.get()
.success(function(data) { .success(function(data) {
$scope.canShareCredential = (data.count) ? true : false; $scope.canShareCredential = (data.count) ? true : false;
}).error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
}); });
} }