mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-03 13:44:13 +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)
|
public function statusLikes(Request $request, $username, $id)
|
||||||
{
|
{
|
||||||
$profile = Profile::whereUsername($username)->whereNull('status')->firstOrFail();
|
$status = Status::findOrFail($id);
|
||||||
$status = Status::whereProfileId($profile->id)->findOrFail($id);
|
$this->scopeCheck($status->profile, $status);
|
||||||
$this->scopeCheck($profile, $status);
|
|
||||||
$likes = $this->getLikes($status);
|
$likes = $this->getLikes($status);
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'data' => $likes
|
'data' => $likes
|
||||||
|
|
Loading…
Reference in a new issue