From 7eca5dc555eb27ff166dcaf9ac984b19ed23963e Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Fri, 5 Apr 2019 22:38:35 +1300 Subject: Use json-schema to spec API endpoint Add public_api/v4/environment.json and other related schemas. --- lib/api/environments.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/api/environments.rb') diff --git a/lib/api/environments.rb b/lib/api/environments.rb index 5ec0e225c35..6cd43923559 100644 --- a/lib/api/environments.rb +++ b/lib/api/environments.rb @@ -112,7 +112,9 @@ module API authorize! :read_environment, user_project environment = user_project.environments.find(params[:environment_id]) - present environment, with: Entities::Environment, current_user: current_user, except: [:project], last_deployment: true + present environment, with: Entities::Environment, current_user: current_user, + except: [:project, { last_deployment: [:environment] }], + last_deployment: true end end end -- cgit v1.2.1