Update ApiV1Controller, wrap ancestor in array

This commit is contained in:
Daniel Supernault 2020-06-18 21:08:13 -06:00
parent 6dd83d32e3
commit 00a96a15f0
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 3 additions and 1 deletions

View File

@ -1534,7 +1534,9 @@ class ApiV1Controller extends Controller
$ancestors = $status->parent();
if($ancestors) {
$ares = new Fractal\Resource\Item($ancestors, new StatusTransformer());
$ancestors = $this->fractal->createData($ares)->toArray();
$ancestors = [
$this->fractal->createData($ares)->toArray()
];
} else {
$ancestors = [];
}