mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-27 02:06:52 +00:00
Merge pull request #435 from pixelfed/frontend-ui-refactor
Update FederationController
This commit is contained in:
commit
1378b82fef
1 changed files with 4 additions and 1 deletions
|
@ -140,7 +140,10 @@ class FederationController extends Controller
|
|||
}
|
||||
|
||||
$user = Profile::whereNull('remote_url')->whereUsername($username)->firstOrFail();
|
||||
$timeline = $user->statuses()->orderBy('created_at', 'desc')->paginate(10);
|
||||
if($user->is_private) {
|
||||
return response()->json(['error'=>'403', 'msg' => 'private profile'], 403);
|
||||
}
|
||||
$timeline = $user->statuses()->whereVisibility('public')->orderBy('created_at', 'desc')->paginate(10);
|
||||
$fractal = new Fractal\Manager();
|
||||
$resource = new Fractal\Resource\Item($user, new ProfileOutbox());
|
||||
$res = $fractal->createData($resource)->toArray();
|
||||
|
|
Loading…
Reference in a new issue