Welcome to mirror list, hosted at ThFree Co, Russian Federation.

abuse_report_entity.rb « admin « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 58637445e819c5a7840f127b747b0a4154fae5c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module Admin
  class AbuseReportEntity < Grape::Entity
    include RequestAwareEntity

    expose :category
    expose :created_at
    expose :updated_at

    expose :reported_user do |report|
      UserEntity.represent(report.user, only: [:name])
    end

    expose :reporter do |report|
      UserEntity.represent(report.reporter, only: [:name])
    end

    expose :report_path do |report|
      admin_abuse_report_path(report)
    end
  end
end