Merge pull request #2110 from coreos-inc/org-delete-bug

Fix bugs due to conflicting operation names in the API
This commit is contained in:
josephschorr 2016-11-14 11:59:23 -05:00 committed by GitHub
commit cd3907b281
5 changed files with 16 additions and 8 deletions

View file

@ -80,7 +80,7 @@ angular.module('quay').factory('RolesService', ['UtilService', 'Restangular', 'A
'teamname': entityName
};
ApiService.getTeamPermissions(null, params).then(function(resp) {
ApiService.getOrganizationTeamPermissions(null, params).then(function(resp) {
callback(resp.permissions);
}, errorHandler);
} else if (entityKind == 'robot') {

View file

@ -181,6 +181,7 @@ function(ApiService, CookieService, $rootScope, Config, $location) {
return;
}
var errorDisplay = ApiService.errorDisplay('Could not delete namespace', callback);
var deleteNamespaceItself = function() {
info.progress = 1;
info.progressMessage = 'Deleting namespace...';
@ -194,10 +195,10 @@ function(ApiService, CookieService, $rootScope, Config, $location) {
}, errorDisplay);
} else {
var delParams = {
'name': info.organization.name
'orgname': info.organization.name
};
ApiService.deleteOrganization(null, delParams).then(function(resp) {
ApiService.deleteAdminedOrganization(null, delParams).then(function(resp) {
// Reload the user.
userService.load();
callback(true);
@ -235,7 +236,6 @@ function(ApiService, CookieService, $rootScope, Config, $location) {
'public': false
};
var errorDisplay = ApiService.errorDisplay('Could not delete namespace', callback);
ApiService.listRepos(null, params).then(function(resp) {
repositories = resp['repositories'];
deleteAllRepos();