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:
authorMatija Čupić <matteeyah@gmail.com>2018-01-30 04:01:53 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-02-05 20:58:19 +0300
commit9be519c199b01d4b4b1c69ec4d74a1e99345eb47 (patch)
tree117f601dda66d48671a3e83b7ed93f8a00c72805 /app/controllers/projects
parentb48d8c8ad0bb2874db6b4c9accb3bebd19e9f2c8 (diff)
Add VariableSerializer for Ci::Variable
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/variables_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index 58fa600eb34..b5635ca1b3b 100644
--- a/app/controllers/projects/variables_controller.rb
+++ b/app/controllers/projects/variables_controller.rb
@@ -7,7 +7,7 @@ class Projects::VariablesController < Projects::ApplicationController
variables = @project.variables
.map { |variable| variable.present(current_user: current_user) }
- render status: :ok, json: { variables: variables }
+ render status: :ok, json: { variables: VariableSerializer.new.represent(variables) }
end
end
end
@@ -19,7 +19,7 @@ class Projects::VariablesController < Projects::ApplicationController
variables = @project.variables
.map { |variable| variable.present(current_user: current_user) }
- return render status: :ok, json: { variables: variables }
+ return render status: :ok, json: { variables: VariableSerializer.new.represent(variables) }
end
render status: :bad_request, json: @project.errors.full_messages