2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
class IssuableSidebarExtrasEntity < Grape::Entity
|
2018-03-17 18:26:18 +05:30
|
|
|
include RequestAwareEntity
|
2019-02-15 15:39:39 +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
|
2019-07-31 22:56:46 +05:30
|
|
|
|
|
|
|
expose :assignees, using: API::Entities::UserBasic
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|