mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
GET relations adapted, POST fixed
This commit is contained in:
parent
6d5f94ab45
commit
577ed7b6be
@ -28,7 +28,6 @@ class RelationshipApiController extends ApiController
|
|||||||
{
|
{
|
||||||
//TODO: add permissions? (voter?)
|
//TODO: add permissions? (voter?)
|
||||||
$relationships = $this->repository->findByPerson($person);
|
$relationships = $this->repository->findByPerson($person);
|
||||||
//dump($relationships[0]->getRelation());
|
|
||||||
|
|
||||||
return $this->json(\array_values($relationships), Response::HTTP_OK, [], ['groups' => [ 'read']]);
|
return $this->json(\array_values($relationships), Response::HTTP_OK, [], ['groups' => [ 'read']]);
|
||||||
}
|
}
|
||||||
|
@ -903,7 +903,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'class' => \Chill\PersonBundle\Entity\Relationships\Relation::class,
|
'class' => \Chill\PersonBundle\Entity\Relationships\Relation::class,
|
||||||
'controller' => \Chill\PersonBundle\Controller\RelationshipApiController::class,
|
|
||||||
'name' => 'relations',
|
'name' => 'relations',
|
||||||
'base_path' => '/api/1.0/relations/relation',
|
'base_path' => '/api/1.0/relations/relation',
|
||||||
'base_role' => 'ROLE_USER',
|
'base_role' => 'ROLE_USER',
|
||||||
|
@ -1675,7 +1675,7 @@ paths:
|
|||||||
/1.0/relations/relation.json:
|
/1.0/relations/relation.json:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- relationships
|
- relations
|
||||||
summary: get a list of relations
|
summary: get a list of relations
|
||||||
responses:
|
responses:
|
||||||
401:
|
401:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user