mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update ProfileSponsorController
This commit is contained in:
parent
f22a4b2d75
commit
bd61a921e8
1 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,8 @@ class ProfileSponsorController extends Controller
|
||||||
{
|
{
|
||||||
public function get(Request $request, $id)
|
public function get(Request $request, $id)
|
||||||
{
|
{
|
||||||
$res = ProfileSponsor::whereProfileId($id)->firstOrFail()->sponsors;
|
$profile = ProfileSponsor::whereProfileId($id)->first();
|
||||||
return response($res)->header('Content-Type', 'application/json');
|
$res = $profile ? $profile->sponsors : [];
|
||||||
|
return response()->json($res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue