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/notes.rb | |
parent | 998afa5f74558be215a924d95aa131a69831ca43 (diff) | |
download | gitlab-ce-e80313f9ee5b3495a8713e6ddae111bc8106155b.tar.gz |
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r-- | lib/api/notes.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb index 58d71787aca..e116448c15b 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -131,10 +131,10 @@ module API note = user_project.notes.find(params[:note_id]) authorize! :admin_note, note - check_unmodified_since(note.updated_at) - status 204 - ::Notes::DestroyService.new(user_project, current_user).execute(note) + destroy_conditionally!(note) do |note| + ::Notes::DestroyService.new(user_project, current_user).execute(note) + end end end end |