mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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?)
|
||||
$relationships = $this->repository->findByPerson($person);
|
||||
//dump($relationships[0]->getRelation());
|
||||
|
||||
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,
|
||||
'controller' => \Chill\PersonBundle\Controller\RelationshipApiController::class,
|
||||
'name' => 'relations',
|
||||
'base_path' => '/api/1.0/relations/relation',
|
||||
'base_role' => 'ROLE_USER',
|
||||
|
@ -1675,7 +1675,7 @@ paths:
|
||||
/1.0/relations/relation.json:
|
||||
get:
|
||||
tags:
|
||||
- relationships
|
||||
- relations
|
||||
summary: get a list of relations
|
||||
responses:
|
||||
401:
|
||||
|
Loading…
x
Reference in New Issue
Block a user