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