Update PublicApiController, use stateless transformer

This commit is contained in:
Daniel Supernault 2020-12-12 23:47:59 -07:00
parent d0d4680709
commit 1325ce2cef
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -635,7 +635,7 @@ class PublicApiController extends Controller
->orderByDesc('id')
->get();
$resource = new Fractal\Resource\Collection($timeline, new StatusTransformer());
$resource = new Fractal\Resource\Collection($timeline, new StatusStatelessTransformer());
$res = $this->fractal->createData($resource)->toArray();
return response()->json($res, 200, [], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);