mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-25 23:38:40 +00:00
add tests
This commit is contained in:
parent
2e5ec71f29
commit
d6d7bc2f89
|
|
@ -291,7 +291,7 @@ final class ApiController extends Controller
|
|||
{
|
||||
$old = clone MediaMapper::get((int) $request->getData('id'));
|
||||
$new = $this->updateMediaFromRequest($request);
|
||||
$this->updateModel($request, $old, $new, MediaMapper::class, 'media');
|
||||
$this->updateModel($request->getHeader()->getAccount(), $old, $new, MediaMapper::class, 'media');
|
||||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Media', 'Media successfully updated', $new);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -532,13 +532,16 @@ class Media implements \JsonSerializable
|
|||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
'extension' => $this->extension,
|
||||
'virtualpath' => $this->virtualPath,
|
||||
'size' => $this->size,
|
||||
'hidden' => $this->hidden,
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
'descriptionRaw' => $this->descriptionRaw,
|
||||
'extension' => $this->extension,
|
||||
'virtualpath' => $this->virtualPath,
|
||||
'size' => $this->size,
|
||||
'hidden' => $this->hidden,
|
||||
'path' => $this->path,
|
||||
'absolute' => $this->isAbsolute,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user