mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 17:28:07 +01:00
cae933510c
Add raw bio fields to the source attribute on GET /api/v1/accounts/verify_credentials
16 lines
338 B
Ruby
16 lines
338 B
Ruby
# frozen_string_literal: true
|
|
|
|
class REST::CredentialAccountSerializer < REST::AccountSerializer
|
|
attributes :source
|
|
|
|
def source
|
|
user = object.user
|
|
|
|
{
|
|
privacy: user.setting_default_privacy,
|
|
sensitive: user.setting_default_sensitive,
|
|
note: object.note,
|
|
fields: object.fields.map(&:to_h),
|
|
}
|
|
end
|
|
end
|