debian-mirror-gitlab/app/serializers/admin/abuse_report_entity.rb
2023-07-09 08:55:56 +05:30

23 lines
481 B
Ruby

# 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