From d3f3810fe1f50f0793a40373240504c06dffbd73 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 29 Jan 2023 15:59:58 +0100 Subject: Fix unserialized `role` on account entities in admin API (#23290) --- app/serializers/rest/admin/account_serializer.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/serializers/rest/admin') diff --git a/app/serializers/rest/admin/account_serializer.rb b/app/serializers/rest/admin/account_serializer.rb index ad98a53e8..959884c55 100644 --- a/app/serializers/rest/admin/account_serializer.rb +++ b/app/serializers/rest/admin/account_serializer.rb @@ -2,7 +2,7 @@ class REST::Admin::AccountSerializer < ActiveModel::Serializer attributes :id, :username, :domain, :created_at, - :email, :ip, :role, :confirmed, :suspended, + :email, :ip, :confirmed, :suspended, :silenced, :sensitized, :disabled, :approved, :locale, :invite_request @@ -11,6 +11,7 @@ class REST::Admin::AccountSerializer < ActiveModel::Serializer has_many :ips, serializer: REST::Admin::IpSerializer has_one :account, serializer: REST::AccountSerializer + has_one :role, serializer: REST::RoleSerializer def id object.id.to_s -- cgit From 88fc04d3d71b43dc788239f7df7897c054c01e57 Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Mon, 27 Mar 2023 00:14:21 -0700 Subject: Serialize status webhook events in REST API format (#24243) --- app/serializers/rest/admin/webhook_event_serializer.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/serializers/rest/admin') diff --git a/app/serializers/rest/admin/webhook_event_serializer.rb b/app/serializers/rest/admin/webhook_event_serializer.rb index fe0ac23f9..b6d2616e5 100644 --- a/app/serializers/rest/admin/webhook_event_serializer.rb +++ b/app/serializers/rest/admin/webhook_event_serializer.rb @@ -7,6 +7,8 @@ class REST::Admin::WebhookEventSerializer < ActiveModel::Serializer REST::Admin::AccountSerializer when 'Report' REST::Admin::ReportSerializer + when 'Status' + REST::StatusSerializer else super end -- cgit