diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-03-02 13:14:13 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-08-28 16:40:25 +0200 |
commit | e80313f9ee5b3495a8713e6ddae111bc8106155b (patch) | |
tree | f1327448ef9e837aedb9fde9a50d6531e42a6112 /lib/api/snippets.rb | |
parent | 998afa5f74558be215a924d95aa131a69831ca43 (diff) | |
download | gitlab-ce-e80313f9ee5b3495a8713e6ddae111bc8106155b.tar.gz |
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/snippets.rb')
-rw-r--r-- | lib/api/snippets.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/snippets.rb b/lib/api/snippets.rb index 7107b3d669c..00eb7c60f16 100644 --- a/lib/api/snippets.rb +++ b/lib/api/snippets.rb @@ -122,10 +122,8 @@ module API return not_found!('Snippet') unless snippet authorize! :destroy_personal_snippet, snippet - check_unmodified_since(snippet.updated_at) - status 204 - snippet.destroy + destroy_conditionally!(snippet) end desc 'Get a raw snippet' do |