summaryrefslogtreecommitdiff
path: root/lib/api/labels.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/labels.rb
parent998afa5f74558be215a924d95aa131a69831ca43 (diff)
downloadgitlab-ce-e80313f9ee5b3495a8713e6ddae111bc8106155b.tar.gz
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r--lib/api/labels.rb5
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