2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-02-13 22:33:31 +05:30
|
|
|
class IssuableSidebarExtrasEntity < Grape::Entity
|
2018-03-17 18:26:18 +05:30
|
|
|
include RequestAwareEntity
|
2019-02-13 22:33:31 +05:30
|
|
|
include TimeTrackableEntity
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
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
|