diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-01-17 10:45:25 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-01-17 10:45:25 +0100 |
commit | b3bf32a21e4dfc43737f50f15d3f258c16d0cf83 (patch) | |
tree | 37daa7d7725d3676115eea2c4d4a215bdd95c06d /app/serializers | |
parent | 430d4427916b44e6a7c16db1899dfef2eec140fc (diff) | |
parent | 14f436c457560862fafabd753eb314c8b8a8e674 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/views/admin/reports/show.html.haml`: Conflicts due to glitch-soc's theming system.
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/rest/admin/report_serializer.rb | 7 |
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 |