diff options
author | Mike Lewis <mlewis@gitlab.com> | 2019-03-07 15:59:00 +0000 |
---|---|---|
committer | Mike Lewis <mlewis@gitlab.com> | 2019-03-07 15:59:00 +0000 |
commit | dbd7309a16bd3abc6c586b6c2df2beb317cfef95 (patch) | |
tree | 3fdd719c926ac80285f0dc93ef975625657d0fbb /lib/api/environments.rb | |
parent | 7be248334b350091e83d0335bf0c263071c6a67f (diff) | |
parent | b63efb09a5c864047924cd2d84527b47dd563d5f (diff) | |
download | gitlab-ce-reply-to-comment-documentation.tar.gz |
Merge branch 'master' into 'reply-to-comment-documentation'reply-to-comment-documentation
# Conflicts:
# doc/user/discussions/index.md
Diffstat (limited to 'lib/api/environments.rb')
-rw-r--r-- | lib/api/environments.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/environments.rb b/lib/api/environments.rb index 0278c6c54a5..5b0f3b914cb 100644 --- a/lib/api/environments.rb +++ b/lib/api/environments.rb @@ -22,7 +22,7 @@ module API get ':id/environments' do authorize! :read_environment, user_project - present paginate(user_project.environments), with: Entities::Environment + present paginate(user_project.environments), with: Entities::Environment, current_user: current_user end desc 'Creates a new environment' do @@ -40,7 +40,7 @@ module API environment = user_project.environments.create(declared_params) if environment.persisted? - present environment, with: Entities::Environment + present environment, with: Entities::Environment, current_user: current_user else render_validation_error!(environment) end @@ -63,7 +63,7 @@ module API update_params = declared_params(include_missing: false).extract!(:name, :external_url) if environment.update(update_params) - present environment, with: Entities::Environment + present environment, with: Entities::Environment, current_user: current_user else render_validation_error!(environment) end @@ -99,7 +99,7 @@ module API environment.stop_with_action!(current_user) status 200 - present environment, with: Entities::Environment + present environment, with: Entities::Environment, current_user: current_user end end end |