Merge pull request #1547 from pixelfed/frontend-ui-refactor

Update PublicApiController
This commit is contained in:
daniel 2019-07-22 22:06:35 -06:00 committed by GitHub
commit 16d6e6bd3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -529,7 +529,7 @@ class PublicApiController extends Controller
$filtered = $ids->filter(function($v) {
return $v != Auth::user()->profile->id;
});
$relations = Profile::findOrFail($filtered->all());
$relations = Profile::whereNull('status')->findOrFail($filtered->all());
$fractal = new Fractal\Resource\Collection($relations, new RelationshipTransformer());
$res = $this->fractal->createData($fractal)->toArray();
return response()->json($res);