Update PublicApiController
This commit is contained in:
parent
4e0617ac84
commit
c4ebe9dca9
|
@ -558,6 +558,7 @@ class PublicApiController extends Controller
|
||||||
'likes_count',
|
'likes_count',
|
||||||
'reblogs_count',
|
'reblogs_count',
|
||||||
'scope',
|
'scope',
|
||||||
|
'visibility',
|
||||||
'local',
|
'local',
|
||||||
'cw_summary',
|
'cw_summary',
|
||||||
'created_at',
|
'created_at',
|
||||||
|
@ -568,12 +569,13 @@ class PublicApiController extends Controller
|
||||||
->whereIn('visibility', $visibility)
|
->whereIn('visibility', $visibility)
|
||||||
->latest()
|
->latest()
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
|
->orderByDesc('created_at')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$resource = new Fractal\Resource\Collection($timeline, new StatusTransformer());
|
$resource = new Fractal\Resource\Collection($timeline, new StatusTransformer());
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
$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