summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-07 14:48:53 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-07 14:48:53 +0100
commitd611a3879816d07f5842e2bdcea69b0813777107 (patch)
tree5f0df5c5d68731198b74b2df3d27070ef632d79c /lib/api/entities.rb
parent0dcff1342b38c093a05c9edd13d422ee0b37b7bd (diff)
parente88fd58671f5407d80fafe1070d48b750b9f2e50 (diff)
downloadgitlab-ce-d611a3879816d07f5842e2bdcea69b0813777107.tar.gz
Merge branch 'master' into reference-pipeline-and-caching
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 9f337bc3cc6..96b73df6af9 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -194,6 +194,7 @@ module API
expose :author, using: Entities::UserBasic
expose :created_at
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
@@ -224,6 +225,8 @@ module API
expose :target_id, :target_type, :author_id
expose :data, :target_title
expose :created_at
+ expose :note, using: Entities::Note, if: ->(event, options) { event.note? }
+ expose :author, using: Entities::UserBasic, if: ->(event, options) { event.author }
expose :author_username do |event, options|
if event.author