2018-09-14 05:42:05 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-08-06 13:08:22 +00:00
|
|
|
class Admin::AbuseReportsController < Admin::ApplicationController
|
2020-10-05 21:08:47 +00:00
|
|
|
feature_category :users
|
|
|
|
|
2015-08-06 13:08:22 +00:00
|
|
|
def index
|
2019-11-11 18:06:27 +00:00
|
|
|
@abuse_reports = AbuseReportsFinder.new(params).execute
|
2015-08-06 13:08:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
2015-08-25 08:52:10 +00:00
|
|
|
abuse_report = AbuseReport.find(params[:id])
|
2015-08-06 13:08:22 +00:00
|
|
|
|
2016-03-12 12:11:30 +00:00
|
|
|
abuse_report.remove_user(deleted_by: current_user) if params[:remove_user]
|
2015-08-25 08:52:10 +00:00
|
|
|
abuse_report.destroy
|
2016-01-13 01:48:16 +00:00
|
|
|
|
2016-03-16 01:16:25 +00:00
|
|
|
head :ok
|
2015-08-06 13:08:22 +00:00
|
|
|
end
|
|
|
|
end
|