Skip to content

Commit

Permalink
Update AccountTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Sep 30, 2019
1 parent 435079c commit 4d084ac
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions app/Transformer/Api/AccountTransformer.php
Expand Up @@ -9,7 +9,7 @@
class AccountTransformer extends Fractal\TransformerAbstract
{
protected $defaultIncludes = [
'relationship',
// 'relationship',
];

public function transform(Profile $profile)
Expand All @@ -24,23 +24,13 @@ public function transform(Profile $profile)
'acct' => $acct,
'display_name' => $profile->name,
'locked' => (bool) $profile->is_private,
'created_at' => $profile->created_at->format('c'),
'followers_count' => $profile->followerCount(),
'following_count' => $profile->followingCount(),
'statuses_count' => (int) $profile->statusCount(),
'note' => $profile->bio ?? '',
'url' => $profile->url(),
'avatar' => $profile->avatarUrl(),
'avatar_static' => $profile->avatarUrl(),
'header' => '',
'header_static' => '',
'header_bg' => $profile->header_bg,
'emojis' => [],
'moved' => null,
'fields' => [],
'bot' => false,
'website' => $profile->website,
'software' => 'pixelfed',
'is_admin' => (bool) $is_admin,
];
}
Expand Down

0 comments on commit 4d084ac

Please sign in to comment.