gitlab-org--gitlab-foss/app/serializers/issuable_sidebar_entity.rb

13 lines
341 B
Ruby
Raw Normal View History

2017-10-31 12:15:03 -04:00
class IssuableSidebarEntity < Grape::Entity
include TimeTrackableEntity
2017-10-31 12:15:03 -04:00
include RequestAwareEntity
expose :participants, using: ::API::Entities::UserBasic do |issuable|
issuable.participants(request.current_user)
end
expose :subscribed do |issuable|
issuable.subscribed?(request.current_user, issuable.project)
end
end