Update AccountTransformer, add note_text and location fields

This commit is contained in:
Daniel Supernault 2021-12-04 17:34:32 -07:00
parent f88b3a2fb9
commit 98f76abbe8
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -29,6 +29,7 @@ class AccountTransformer extends Fractal\TransformerAbstract
'following_count' => $profile->followingCount(),
'statuses_count' => (int) $profile->statusCount(),
'note' => $profile->bio ?? '',
'note_text' => strip_tags($profile->bio),
'url' => $profile->url(),
'avatar' => $profile->avatarUrl(),
'website' => $profile->website,
@ -37,7 +38,8 @@ class AccountTransformer extends Fractal\TransformerAbstract
'created_at' => $profile->created_at->toJSON(),
'header_bg' => $profile->header_bg,
'last_fetched_at' => optional($profile->last_fetched_at)->toJSON(),
'pronouns' => PronounService::get($profile->id)
'pronouns' => PronounService::get($profile->id),
'location' => $profile->location
];
}