mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-24 22:42:27 -05:00
17 lines
342 B
Ruby
17 lines
342 B
Ruby
require_dependency 'report'
|
|
|
|
class Admin::ReportsController < Admin::AdminController
|
|
|
|
def show
|
|
|
|
report_type = params[:type]
|
|
|
|
raise Discourse::NotFound.new unless report_type =~ /^[a-z0-9\_]+$/
|
|
|
|
report = Report.find(report_type)
|
|
raise Discourse::NotFound.new if report.blank?
|
|
|
|
render_json_dump(report: report)
|
|
end
|
|
|
|
end
|