summaryrefslogtreecommitdiff
path: root/app/controllers/projects/protected_refs_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/controllers/projects/protected_refs_controller.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/controllers/projects/protected_refs_controller.rb')
-rw-r--r--app/controllers/projects/protected_refs_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/protected_refs_controller.rb b/app/controllers/projects/protected_refs_controller.rb
index 69a540158c6..442110d1044 100644
--- a/app/controllers/projects/protected_refs_controller.rb
+++ b/app/controllers/projects/protected_refs_controller.rb
@@ -22,7 +22,10 @@ class Projects::ProtectedRefsController < Projects::ApplicationController
flash[:alert] = protected_ref.errors.full_messages.join(', ').html_safe
end
- redirect_to_repository_settings(@project, anchor: params[:update_section])
+ respond_to do |format|
+ format.html { redirect_to_repository_settings(@project, anchor: params[:update_section]) }
+ format.json { head :ok }
+ end
end
def show