mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix backend error with AccompanyingCourse endpoints
This commit is contained in:
parent
c200e9909e
commit
a3b203c306
@ -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']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user