debian-mirror-gitlab/app/helpers/admin/abuse_reports_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
642 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
module Admin
module AbuseReportsHelper
def abuse_reports_list_data(reports)
{
abuse_reports_data: {
categories: AbuseReport.categories.keys,
reports: Admin::AbuseReportSerializer.new.represent(reports),
pagination: {
current_page: reports.current_page,
per_page: reports.limit_value,
total_items: reports.total_count
}
}.to_json
}
end
2023-07-09 08:55:56 +05:30
def abuse_report_data(report)
{
abuse_report_data: Admin::AbuseReportDetailsSerializer.new.represent(report).to_json
}
end
2023-05-27 22:25:52 +05:30
end
end