Add notifications for statuses deleted by moderators (#17204)

This commit is contained in:
Eugen Rochko
2022-01-17 09:41:33 +01:00
committed by GitHub
parent d5c9feb7b7
commit 14f436c457
59 changed files with 1220 additions and 598 deletions

View File

@ -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