Update ApiV1Controller, fix media update. Fixes #4196

This commit is contained in:
Daniel Supernault 2023-03-03 21:22:35 -07:00
parent 93077625ca
commit f31646502f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -1628,7 +1628,10 @@ class ApiV1Controller extends Controller
], 429);
};
return $this->json(MediaService::get($media->status_id));
$fractal = new Fractal\Manager();
$fractal->setSerializer(new ArraySerializer());
$resource = new Fractal\Resource\Item($media, new MediaTransformer());
return $this->json($fractal->createData($resource)->toArray());
}
/**