diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-20 09:33:42 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-20 09:33:42 +0100 |
commit | e7551214f33eb722ad48a8749db743a20d5ff17d (patch) | |
tree | e4757761d07c50211a22c8ec2d6ea874a2dfa257 /lib/api | |
parent | 12cd4c83604e43dc308ba13fa3d5a6571409c1f8 (diff) | |
download | gitlab-ce-e7551214f33eb722ad48a8749db743a20d5ff17d.tar.gz |
API: Remove `DELETE projects/:id/deploy_keys/:key_id/disable`api-remove-deploy-key-disable
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/deploy_keys.rb | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 982645c2f64..69e85c27a65 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -93,20 +93,6 @@ module API end end - desc 'Disable a deploy key for a project' do - detail 'This feature was added in GitLab 8.11' - success Entities::SSHKey - end - params do - requires :key_id, type: Integer, desc: 'The ID of the deploy key' - end - delete ":id/deploy_keys/:key_id/disable" do - key = user_project.deploy_keys_projects.find_by(deploy_key_id: params[:key_id]) - key.destroy - - present key.deploy_key, with: Entities::SSHKey - end - desc 'Delete deploy key for a project' do success Key end @@ -115,11 +101,9 @@ module API end delete ":id/deploy_keys/:key_id" do key = user_project.deploy_keys_projects.find_by(deploy_key_id: params[:key_id]) - if key - key.destroy - else - not_found!('Deploy Key') - end + not_found!('Deploy Key') unless key + + key.destroy end end end |