diff options
Diffstat (limited to 'lib/api/deploy_keys.rb')
-rw-r--r-- | lib/api/deploy_keys.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 11340e91aae..3259b615369 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -25,8 +25,7 @@ module API get "deploy_keys" do authenticated_as_admin! - deploy_keys = DeployKey.all.preload_users - present paginate(deploy_keys), with: Entities::SSHKey + present paginate(DeployKey.all), with: Entities::DeployKey end params do @@ -43,7 +42,7 @@ module API end # rubocop: disable CodeReuse/ActiveRecord get ":id/deploy_keys" do - keys = user_project.deploy_keys_projects.preload(deploy_key: [:user]) + keys = user_project.deploy_keys_projects.preload(:deploy_key) present paginate(keys), with: Entities::DeployKeysProject end @@ -105,7 +104,7 @@ module API # rubocop: enable CodeReuse/ActiveRecord desc 'Update an existing deploy key for a project' do - success Entities::SSHKey + success Entities::DeployKey end params do requires :key_id, type: Integer, desc: 'The ID of the deploy key' @@ -140,7 +139,7 @@ module API desc 'Enable a deploy key for a project' do detail 'This feature was added in GitLab 8.11' - success Entities::SSHKey + success Entities::DeployKey end params do requires :key_id, type: Integer, desc: 'The ID of the deploy key' @@ -150,7 +149,7 @@ module API current_user, declared_params).execute if key - present key, with: Entities::SSHKey + present key, with: Entities::DeployKey else not_found!('Deploy Key') end |