Welcome to mirror list, hosted at ThFree Co, Russian Federation.

abuse_reports_controller.rb « admin « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 68a49f0749fc4d826ab7ea8586f6954a8e1f6fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Admin::AbuseReportsController < Admin::ApplicationController
  # rubocop: disable CodeReuse/ActiveRecord
  def index
    @abuse_reports = AbuseReport.order(id: :desc).page(params[:page])
    @abuse_reports.includes(:reporter, :user)
  end
  # rubocop: enable CodeReuse/ActiveRecord

  def destroy
    abuse_report = AbuseReport.find(params[:id])

    abuse_report.remove_user(deleted_by: current_user) if params[:remove_user]
    abuse_report.destroy

    head :ok
  end
end