From a3b203c30629c18ebb0de9e2d79f4b5dc0643ae5 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 27 Oct 2021 16:28:13 +0200 Subject: [PATCH] fix backend error with AccompanyingCourse endpoints --- .../Controller/RelationshipApiController.php | 6 +++--- .../ChillPersonBundle/config/services/controller.yaml | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php b/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php index 921f2d151..765d13d25 100644 --- a/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php @@ -26,15 +26,15 @@ class RelationshipApiController extends ApiController /** * @Route("/api/1.0/relation/relationship/by-person/{person_id}.json", * name="chill_relation_relationship_by_person") - * + * * @ParamConverter("person", options={"id" = "person_id"}) */ public function getRelationshipsByPerson(Person $person) { //TODO: add permissions? (voter?) $relationships = $this->repository->findByPerson($person); - dump($relationships[0]->getRelation()); + //dump($relationships[0]->getRelation()); return $this->json(\array_values($relationships), Response::HTTP_OK, [], ['groups' => [ 'read']]); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillPersonBundle/config/services/controller.yaml b/src/Bundle/ChillPersonBundle/config/services/controller.yaml index cb7ebd76c..45a656e89 100644 --- a/src/Bundle/ChillPersonBundle/config/services/controller.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/controller.yaml @@ -41,10 +41,7 @@ services: tags: ['controller.service_arguments'] Chill\PersonBundle\Controller\AccompanyingCourseApiController: - arguments: - $eventDispatcher: '@Symfony\Contracts\EventDispatcher\EventDispatcherInterface' - $validator: '@Symfony\Component\Validator\Validator\ValidatorInterface' - $registry: '@Symfony\Component\Workflow\Registry' + autowire: true tags: ['controller.service_arguments'] Chill\PersonBundle\Controller\PersonApiController: