summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-04-16 21:09:08 +0200
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-05-06 10:47:11 +0200
commit3bdc57f0a710b3769381ecad7ea4098223ecff56 (patch)
treeabfe22d7d40c7d3e2912d659b045273254767dea /lib/api/entities.rb
parent05920a7964a039fd65d6b665c2ebd130d5ef949c (diff)
downloadgitlab-ce-3bdc57f0a710b3769381ecad7ea4098223ecff56.tar.gz
Create table for award emoji
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 60b9f5e0ece..b3769ba9c2d 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -170,6 +170,7 @@ module API
expose :label_names, as: :labels
expose :milestone, using: Entities::Milestone
expose :assignee, :author, using: Entities::UserBasic
+ expose :upvotes, :downvotes
expose :subscribed do |issue, options|
issue.subscribed?(options[:current_user])
@@ -178,7 +179,7 @@ module API
class MergeRequest < ProjectEntity
expose :target_branch, :source_branch
- expose :upvotes, :downvotes
+ expose :upvotes, :downvotes
expose :author, :assignee, using: Entities::UserBasic
expose :source_project_id, :target_project_id
expose :label_names, as: :labels
@@ -216,8 +217,8 @@ module API
expose :system?, as: :system
expose :noteable_id, :noteable_type
# upvote? and downvote? are deprecated, always return false
- expose :upvote?, as: :upvote
- expose :downvote?, as: :downvote
+ expose(:upvote?) { |note| false }
+ expose(:downvote?) { |note| false }
end
class MRNote < Grape::Entity