about summary refs log tree commit diff
path: root/app/controllers/admin/reports_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/reports_controller.rb')
-rw-r--r--app/controllers/admin/reports_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/admin/reports_controller.rb b/app/controllers/admin/reports_controller.rb
index 67d57e4eb..2b3b1809f 100644
--- a/app/controllers/admin/reports_controller.rb
+++ b/app/controllers/admin/reports_controller.rb
@@ -7,7 +7,7 @@ class Admin::ReportsController < ApplicationController
   layout 'admin'
 
   def index
-    @reports = Report.includes(:account, :target_account).paginate(page: params[:page], per_page: 40)
+    @reports = Report.includes(:account, :target_account).order('id desc').paginate(page: params[:page], per_page: 40)
     @reports = params[:action_taken].present? ? @reports.resolved : @reports.unresolved
   end
 
@@ -16,19 +16,19 @@ class Admin::ReportsController < ApplicationController
   end
 
   def resolve
-    @report.update(action_taken: true)
+    @report.update(action_taken: true, action_taken_by_account_id: current_account.id)
     redirect_to admin_report_path(@report)
   end
 
   def suspend
     Admin::SuspensionWorker.perform_async(@report.target_account.id)
-    @report.update(action_taken: true)
+    Report.unresolved.where(target_account: @report.target_account).update_all(action_taken: true, action_taken_by_account_id: current_account.id)
     redirect_to admin_report_path(@report)
   end
 
   def silence
     @report.target_account.update(silenced: true)
-    @report.update(action_taken: true)
+    Report.unresolved.where(target_account: @report.target_account).update_all(action_taken: true, action_taken_by_account_id: current_account.id)
     redirect_to admin_report_path(@report)
   end