debian-mirror-gitlab/app/serializers/issuable_sidebar_extras_entity.rb

15 lines
378 B
Ruby
Raw Normal View History

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
end