Skip to content

Commit 807a380

Browse files
committed
Update AccountController, add followed_by param to relation state
1 parent c427900 commit 807a380

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Http/Controllers/Api/AccountController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,15 @@ public function getRelationshipState(Request $request, $id)
263263
]);
264264
}
265265

266-
$account = AccountService::get($id);
266+
$account = AccountService::get($id, false);
267267

268268
if (! $account) {
269269
return $this->error('Record not found');
270270
}
271271

272272
$res = [
273273
'pending_follow_request' => false,
274+
'followed_by' => (bool) FollowerService::follows($id, $pid),
274275
'following' => (bool) FollowerService::follows($pid, $id),
275276
'blocking' => (bool) UserFilterService::isBlocking($pid, $id),
276277
];

0 commit comments

Comments
 (0)