diff options
author | Stan Hu <stanhu@gmail.com> | 2015-06-16 10:00:55 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-06 19:47:22 +0300 |
commit | 4254f09eaa851d867f440420d719313dd2f13f82 (patch) | |
tree | 624db9a06dd7c76af02bec055f7af2aeb1f5c16e /app/controllers/projects/branches_controller.rb | |
parent | e2190115e860686c4ec3a3b9e809257ef8d9265b (diff) |
Return 40x error codes if branch could not be deleted in UI
Diffstat (limited to 'app/controllers/projects/branches_controller.rb')
-rw-r--r-- | app/controllers/projects/branches_controller.rb | 4 |
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 |