add a patch resource api endpoint (wip)

This commit is contained in:
2022-01-04 19:37:27 +01:00
parent af2eca0d03
commit 4f1540c541
5 changed files with 94 additions and 2 deletions

View File

@@ -38,6 +38,15 @@ class AccompanyingPeriodResourceNormalizer implements DenormalizerAwareInterface
$this->repository = $repository;
}
public function normalize($resource, $format = null, array $context = [])
{
return [
'type' => 'accompanying_period_resource',
'id' => $resource->getId(),
'comment' => $resource->getComment()
];
}
public function denormalize($data, $type, $format = null, array $context = [])
{
$resource = $this->extractObjectToPopulate($type, $context);