summaryrefslogtreecommitdiff
path: root/lib/api/snippets.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-03-02 13:14:13 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2017-08-28 16:40:25 +0200
commite80313f9ee5b3495a8713e6ddae111bc8106155b (patch)
treef1327448ef9e837aedb9fde9a50d6531e42a6112 /lib/api/snippets.rb
parent998afa5f74558be215a924d95aa131a69831ca43 (diff)
downloadgitlab-ce-e80313f9ee5b3495a8713e6ddae111bc8106155b.tar.gz
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/snippets.rb')
-rw-r--r--lib/api/snippets.rb4
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