GET relations adapted, POST fixed

This commit is contained in:
Julie Lenaerts 2021-11-03 12:52:21 +01:00
parent 6d5f94ab45
commit 577ed7b6be
3 changed files with 1 additions and 3 deletions

View File

@ -28,7 +28,6 @@ class RelationshipApiController extends ApiController
{
//TODO: add permissions? (voter?)
$relationships = $this->repository->findByPerson($person);
//dump($relationships[0]->getRelation());
return $this->json(\array_values($relationships), Response::HTTP_OK, [], ['groups' => [ 'read']]);
}

View File

@ -903,7 +903,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
],
[
'class' => \Chill\PersonBundle\Entity\Relationships\Relation::class,
'controller' => \Chill\PersonBundle\Controller\RelationshipApiController::class,
'name' => 'relations',
'base_path' => '/api/1.0/relations/relation',
'base_role' => 'ROLE_USER',

View File

@ -1675,7 +1675,7 @@ paths:
/1.0/relations/relation.json:
get:
tags:
- relationships
- relations
summary: get a list of relations
responses:
401: