debian-mirror-gitlab/app/serializers/admin/abuse_report_entity.rb
2023-05-27 22:25:52 +05:30

16 lines
343 B
Ruby

# frozen_string_literal: true
module Admin
class AbuseReportEntity < Grape::Entity
expose :category
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
end
end