#214: update list of refs on error
This commit is contained in:
parent
aadb77cf56
commit
61e4154deb
|
@ -46,9 +46,11 @@ RosaABF.controller('ProjectRefsController', ['$scope', '$http', 'ApiProject', fu
|
||||||
$scope.destroy = function(branch) {
|
$scope.destroy = function(branch) {
|
||||||
$scope.project_resource.$delete_branch(
|
$scope.project_resource.$delete_branch(
|
||||||
{owner: $scope.project.owner.uname, project: $scope.project.name, ref: branch.ref},
|
{owner: $scope.project.owner.uname, project: $scope.project.name, ref: branch.ref},
|
||||||
function() {
|
function() { // on success
|
||||||
var i = $scope.branches.indexOf(branch);
|
var i = $scope.branches.indexOf(branch);
|
||||||
if(i != -1) { $scope.branches.splice(i, 1); }
|
if(i != -1) { $scope.branches.splice(i, 1); }
|
||||||
|
}, function () { // on error
|
||||||
|
$scope.getRefs();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue