gearheads
/
mastodon
Archived
2
0
Fork 0

Fix unserialized `role` on account entities in admin API (#23290)

gh/stable
Eugen Rochko 2023-01-29 15:59:58 +01:00 committed by GitHub
parent 1708167dd3
commit d3f3810fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
class REST::Admin::AccountSerializer < ActiveModel::Serializer class REST::Admin::AccountSerializer < ActiveModel::Serializer
attributes :id, :username, :domain, :created_at, attributes :id, :username, :domain, :created_at,
:email, :ip, :role, :confirmed, :suspended, :email, :ip, :confirmed, :suspended,
:silenced, :sensitized, :disabled, :approved, :locale, :silenced, :sensitized, :disabled, :approved, :locale,
:invite_request :invite_request
@ -11,6 +11,7 @@ class REST::Admin::AccountSerializer < ActiveModel::Serializer
has_many :ips, serializer: REST::Admin::IpSerializer has_many :ips, serializer: REST::Admin::IpSerializer
has_one :account, serializer: REST::AccountSerializer has_one :account, serializer: REST::AccountSerializer
has_one :role, serializer: REST::RoleSerializer
def id def id
object.id.to_s object.id.to_s