浏览代码

Update AccountTransformer

Daniel Supernault 5 年之前
父节点
当前提交
6a80146b0c
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      app/Transformer/Api/AccountTransformer.php

+ 5 - 6
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,
 		];
 	}