summaryrefslogtreecommitdiff
path: root/lib/api/award_emoji.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-03-01 14:35:48 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2017-08-28 16:40:25 +0200
commit998afa5f74558be215a924d95aa131a69831ca43 (patch)
tree500c242e2bacd966b3faf1a019f28edff2ee24d7 /lib/api/award_emoji.rb
parent7ccef75a26bc4997e04c109007e6c6ee004574cb (diff)
downloadgitlab-ce-998afa5f74558be215a924d95aa131a69831ca43.tar.gz
API: Respect the 'If-Unmodified-Since' for delete endpoints
Diffstat (limited to 'lib/api/award_emoji.rb')
-rw-r--r--lib/api/award_emoji.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb
index 5a028fc9d0b..51a8587d26e 100644
--- a/lib/api/award_emoji.rb
+++ b/lib/api/award_emoji.rb
@@ -85,6 +85,7 @@ module API
end
delete "#{endpoint}/:award_id" do
award = awardable.award_emoji.find(params[:award_id])
+ check_unmodified_since(award.updated_at)
unauthorized! unless award.user == current_user || current_user.admin?