Commit 95954a60 authored by Tiago Botelho's avatar Tiago Botelho Committed by Jose

Adds environments list to additional_metrics JSON payload

parent a5db8645
......@@ -141,7 +141,12 @@ class Projects::EnvironmentsController < Projects::ApplicationController
format.json do
additional_metrics = environment.additional_metrics || {}
render json: additional_metrics, status: additional_metrics.any? ? :ok : :no_content
render json: {
additional_metrics: additional_metrics,
environments: EnvironmentSerializer
.new(project: project, current_user: current_user)
.represent(environments)
}, status: additional_metrics.empty? ? :ok : :no_content
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment