Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-12-17 21:05:08 +0300
committerRémy Coutable <remy@rymai.me>2018-12-17 21:15:06 +0300
commiteecb6d2f78a483b141b00f735917fe93848a22f2 (patch)
treeff1379bf52b666495a6776d9c911a2bbb7950f10 /app/controllers/projects/protected_refs_controller.rb
parent4a10c813e726d09216c534bb0ad0ae50a0400259 (diff)
Reduce diff with EE in ProtectedRefsController
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers/projects/protected_refs_controller.rb')
-rw-r--r--app/controllers/projects/protected_refs_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/protected_refs_controller.rb b/app/controllers/projects/protected_refs_controller.rb
index 3a3a29ddd0d..4e2a9df5576 100644
--- a/app/controllers/projects/protected_refs_controller.rb
+++ b/app/controllers/projects/protected_refs_controller.rb
@@ -32,7 +32,7 @@ class Projects::ProtectedRefsController < Projects::ApplicationController
@protected_ref = update_service_class.new(@project, current_user, protected_ref_params).execute(@protected_ref)
if @protected_ref.valid?
- render json: @protected_ref, status: :ok
+ render json: @protected_ref, status: :ok, include: access_levels
else
render json: @protected_ref.errors, status: :unprocessable_entity
end
@@ -62,6 +62,6 @@ class Projects::ProtectedRefsController < Projects::ApplicationController
end
def access_level_attributes
- %i(access_level id)
+ %i[access_level id]
end
end