summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-04-05 22:38:35 +1300
committerKrasimir Angelov <kangelov@gitlab.com>2019-04-08 09:01:48 +1200
commit7eca5dc555eb27ff166dcaf9ac984b19ed23963e (patch)
treeb86431f12fe3b99fab16b91f9a1d0f92da521579 /lib
parent4c9ab64da79fbbcfe58253a02134e0d39329cea7 (diff)
downloadgitlab-ce-30157-api-expose-single-environment.tar.gz
Use json-schema to spec API endpoint30157-api-expose-single-environment
Add public_api/v4/environment.json and other related schemas.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/environments.rb4
1 files changed, 3 insertions, 1 deletions
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