summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-06-16 00:00:55 -0700
committerStan Hu <stanhu@gmail.com>2015-07-06 09:47:22 -0700
commit4254f09eaa851d867f440420d719313dd2f13f82 (patch)
tree624db9a06dd7c76af02bec055f7af2aeb1f5c16e /app
parente2190115e860686c4ec3a3b9e809257ef8d9265b (diff)
downloadgitlab-ce-4254f09eaa851d867f440420d719313dd2f13f82.tar.gz
Return 40x error codes if branch could not be deleted in UI
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/branches_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index 696011b94b9..117ae3aaa3d 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -32,7 +32,7 @@ class Projects::BranchesController < Projects::ApplicationController
end
def destroy
- DeleteBranchService.new(project, current_user).execute(params[:id])
+ status = DeleteBranchService.new(project, current_user).execute(params[:id])
@branch_name = params[:id]
respond_to do |format|
@@ -40,7 +40,7 @@ class Projects::BranchesController < Projects::ApplicationController
redirect_to namespace_project_branches_path(@project.namespace,
@project)
end
- format.js
+ format.js { render status: status[:return_code] }
end
end
end