summaryrefslogtreecommitdiff
path: root/app/controllers/groups
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-02-01 21:38:41 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-02-05 18:58:20 +0100
commitc95c3ffc9e4f1992929899bfc21440b621cc8daf (patch)
treea40f32e73f159720b5d8d0906a7883ee281aede7 /app/controllers/groups
parente2c8a2231bcc00e5993411e4ad6c0c0db7e1a297 (diff)
downloadgitlab-ce-c95c3ffc9e4f1992929899bfc21440b621cc8daf.tar.gz
Switch emphasis from controller format to update
Diffstat (limited to 'app/controllers/groups')
-rw-r--r--app/controllers/groups/variables_controller.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/groups/variables_controller.rb b/app/controllers/groups/variables_controller.rb
index 3e78711dabf..0ebfebd6682 100644
--- a/app/controllers/groups/variables_controller.rb
+++ b/app/controllers/groups/variables_controller.rb
@@ -11,13 +11,13 @@ module Groups
end
def update
- respond_to do |format|
- format.json do
- if @group.update(variables_params)
- return render status: :ok, json: { variables: GroupVariableSerializer.new.represent(@group.variables) }
- end
-
- render status: :bad_request, json: @group.errors.full_messages
+ if @group.update(variables_params)
+ respond_to do |format|
+ format.json { return render status: :ok, json: { variables: GroupVariableSerializer.new.represent(@group.variables) } }
+ end
+ else
+ respond_to do |format|
+ format.json { render status: :bad_request, json: @group.errors.full_messages }
end
end
end