mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 19:34:31 +02:00
Added an simple import system for attachment types.
This commit is contained in:
parent
b827737caa
commit
68aa750e00
7 changed files with 297 additions and 6 deletions
|
@ -96,7 +96,14 @@ class EntityExporter
|
|||
break;
|
||||
}
|
||||
|
||||
$response = new Response($this->serializer->serialize($entity, $format,
|
||||
//Ensure that we always serialize an array. This makes it easier to import the data again.
|
||||
if(is_array($entity)) {
|
||||
$entity_array = $entity;
|
||||
} else {
|
||||
$entity_array = [$entity];
|
||||
}
|
||||
|
||||
$response = new Response($this->serializer->serialize($entity_array, $format,
|
||||
[
|
||||
'groups' => $groups,
|
||||
'as_collection' => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue