about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-01-17 09:41:33 +0100
committerGitHub <noreply@github.com>2022-01-17 09:41:33 +0100
commit14f436c457560862fafabd753eb314c8b8a8e674 (patch)
tree905e62fd68c52efc9eec5b63d7170eee0c0c93a7 /app/serializers
parentd5c9feb7b7fc489afbd0a287431fe07b42451ef0 (diff)
Add notifications for statuses deleted by moderators (#17204)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/admin/report_serializer.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/rest/admin/report_serializer.rb b/app/serializers/rest/admin/report_serializer.rb
index 7a77132c0..74bc0c520 100644
--- a/app/serializers/rest/admin/report_serializer.rb
+++ b/app/serializers/rest/admin/report_serializer.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class REST::Admin::ReportSerializer < ActiveModel::Serializer
-  attributes :id, :action_taken, :comment, :created_at, :updated_at
+  attributes :id, :action_taken, :category, :comment, :created_at, :updated_at
 
   has_one :account, serializer: REST::Admin::AccountSerializer
   has_one :target_account, serializer: REST::Admin::AccountSerializer
@@ -9,8 +9,13 @@ class REST::Admin::ReportSerializer < ActiveModel::Serializer
   has_one :action_taken_by_account, serializer: REST::Admin::AccountSerializer
 
   has_many :statuses, serializer: REST::StatusSerializer
+  has_many :rules, serializer: REST::RuleSerializer
 
   def id
     object.id.to_s
   end
+
+  def statuses
+    object.statuses.with_includes
+  end
 end