mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update PublicApiController, fix likes bug
This commit is contained in:
parent
525dce1c59
commit
3c1e1f7e87
1 changed files with 2 additions and 3 deletions
|
@ -199,9 +199,8 @@ class PublicApiController extends Controller
|
|||
|
||||
public function statusLikes(Request $request, $username, $id)
|
||||
{
|
||||
$profile = Profile::whereUsername($username)->whereNull('status')->firstOrFail();
|
||||
$status = Status::whereProfileId($profile->id)->findOrFail($id);
|
||||
$this->scopeCheck($profile, $status);
|
||||
$status = Status::findOrFail($id);
|
||||
$this->scopeCheck($status->profile, $status);
|
||||
$likes = $this->getLikes($status);
|
||||
return response()->json([
|
||||
'data' => $likes
|
||||
|
|
Loading…
Reference in a new issue