mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
AccompanyingPeriodResource: fix deserialization + code style
This commit is contained in:
@@ -162,7 +162,7 @@ class ApiController extends AbstractCRUDController
|
||||
} catch (NotEncodableValueException $e) {
|
||||
throw new BadRequestException('invalid json', 400, $e);
|
||||
}
|
||||
|
||||
dump($entity);
|
||||
$errors = $this->validate($action, $request, $_format, $entity);
|
||||
|
||||
$response = $this->onAfterValidation($action, $request, $_format, $entity, $errors);
|
||||
@@ -177,7 +177,7 @@ class ApiController extends AbstractCRUDController
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
dump('before flush');
|
||||
$this->getDoctrine()->getManager()->flush();
|
||||
|
||||
$response = $this->onAfterFlush($action, $request, $_format, $entity, $errors);
|
||||
@@ -351,6 +351,7 @@ class ApiController extends AbstractCRUDController
|
||||
$default,
|
||||
$this->getContextForSerialization($action, $request, $_format, $entity)
|
||||
);
|
||||
dump($context);
|
||||
|
||||
return $this->getSerializer()->deserialize($request->getContent(), $this->getEntityClass(), $_format, $context);
|
||||
}
|
||||
|
Reference in New Issue
Block a user