From 6a80146b0cc030cb24bd98b1a1d16de2280e2038 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Sep 2019 00:02:09 -0600 Subject: [PATCH] Update AccountTransformer --- app/Transformer/Api/AccountTransformer.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Transformer/Api/AccountTransformer.php b/app/Transformer/Api/AccountTransformer.php index 45d48ff08..de494c5cb 100644 --- a/app/Transformer/Api/AccountTransformer.php +++ b/app/Transformer/Api/AccountTransformer.php @@ -28,21 +28,20 @@ class AccountTransformer extends Fractal\TransformerAbstract 'followers_count' => $profile->followerCount(), 'following_count' => $profile->followingCount(), 'statuses_count' => (int) $profile->statusCount(), - 'note' => $profile->bio, + 'note' => $profile->bio ?? '', 'url' => $profile->url(), 'avatar' => $profile->avatarUrl(), 'avatar_static' => $profile->avatarUrl(), - 'header' => null, - 'header_static' => null, + 'header' => '', + 'header_static' => '', 'header_bg' => $profile->header_bg, + 'emojis' => [], 'moved' => null, 'fields' => null, - 'bot' => null, + 'bot' => false, 'website' => $profile->website, 'software' => 'pixelfed', 'is_admin' => (bool) $is_admin, - 'last_status_at' => null, - 'emojis' => null, ]; }