Browse Source

Update AccountTransformer, add note_text and location fields

Daniel Supernault 3 years ago
parent
commit
98f76abbe8
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Transformer/Api/AccountTransformer.php

+ 3 - 1
app/Transformer/Api/AccountTransformer.php

@@ -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
 		];
 	}