diff options
Diffstat (limited to 'lib/api/deploy_keys.rb')
-rw-r--r-- | lib/api/deploy_keys.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index e86bcc19b2b..11340e91aae 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -25,7 +25,8 @@ module API get "deploy_keys" do authenticated_as_admin! - present paginate(DeployKey.all), with: Entities::SSHKey + deploy_keys = DeployKey.all.preload_users + present paginate(deploy_keys), with: Entities::SSHKey end params do @@ -42,7 +43,7 @@ module API end # rubocop: disable CodeReuse/ActiveRecord get ":id/deploy_keys" do - keys = user_project.deploy_keys_projects.preload(:deploy_key) + keys = user_project.deploy_keys_projects.preload(deploy_key: [:user]) present paginate(keys), with: Entities::DeployKeysProject end |