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/labels.rb | |
parent | 998afa5f74558be215a924d95aa131a69831ca43 (diff) | |
download | gitlab-ce-e80313f9ee5b3495a8713e6ddae111bc8106155b.tar.gz |
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r-- | lib/api/labels.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb index 45fa57fdf55..c0cf618ee8d 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -56,10 +56,7 @@ module API label = user_project.labels.find_by(title: params[:name]) not_found!('Label') unless label - check_unmodified_since(label.updated_at) - - status 204 - label.destroy + destroy_conditionally!(label) end desc 'Update an existing label. At least one optional parameter is required.' do |