summaryrefslogtreecommitdiff
path: root/app/serializers/issuable_sidebar_entity.rb
blob: 773d78d324cbcf2d7b60997b4a6c67f204630583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class IssuableSidebarEntity < Grape::Entity
  include TimeTrackableEntity
  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