mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update PublicApiController
This commit is contained in:
parent
4e0617ac84
commit
c4ebe9dca9
1 changed files with 3 additions and 1 deletions
|
@ -558,6 +558,7 @@ class PublicApiController extends Controller
|
|||
'likes_count',
|
||||
'reblogs_count',
|
||||
'scope',
|
||||
'visibility',
|
||||
'local',
|
||||
'cw_summary',
|
||||
'created_at',
|
||||
|
@ -568,12 +569,13 @@ class PublicApiController extends Controller
|
|||
->whereIn('visibility', $visibility)
|
||||
->latest()
|
||||
->limit($limit)
|
||||
->orderByDesc('created_at')
|
||||
->get();
|
||||
|
||||
$resource = new Fractal\Resource\Collection($timeline, new StatusTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
||||
return response()->json($res);
|
||||
return response()->json($res, 200, [], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue