diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-03-02 15:14:13 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-08-28 17:40:25 +0300 |
commit | e80313f9ee5b3495a8713e6ddae111bc8106155b (patch) | |
tree | f1327448ef9e837aedb9fde9a50d6531e42a6112 /lib/api/deploy_keys.rb | |
parent | 998afa5f74558be215a924d95aa131a69831ca43 (diff) |
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/deploy_keys.rb')
-rw-r--r-- | lib/api/deploy_keys.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 971cc816454..f405c341398 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -125,10 +125,7 @@ module API key = user_project.deploy_keys_projects.find_by(deploy_key_id: params[:key_id]) not_found!('Deploy Key') unless key - check_unmodified_since(key.updated_at) - - status 204 - key.destroy + destroy_conditionally!(key) end end end |