mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update ApiV1Controller, fix media update. Fixes #4196
This commit is contained in:
parent
93077625ca
commit
f31646502f
1 changed files with 4 additions and 1 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue