add api for getting goal and results by social action and goal

This commit is contained in:
2021-06-22 16:08:53 +02:00
parent 34d6452286
commit b53f6af8d8
14 changed files with 700 additions and 12 deletions

View File

@@ -688,6 +688,48 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
],
]
],
[
'class' => \Chill\PersonBundle\Entity\SocialWork\Goal::class,
'controller' => \Chill\PersonBundle\Controller\SocialWorkGoalApiController::class,
'name' => 'social_work_goal',
'base_path' => '/api/1.0/person/social-work/goal',
'base_role' => 'ROLE_USER',
'actions' => [
'_entity' => [
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
],
'roles' => [
Request::METHOD_GET => 'ROLE_USER',
Request::METHOD_HEAD => 'ROLE_USER',
]
],
'_index' => [
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
],
'roles' => [
Request::METHOD_GET => 'ROLE_USER',
Request::METHOD_HEAD => 'ROLE_USER',
]
],
'by-social-action' => [
'single-collection' => 'collection',
'path' => '/by-social-action/{id}.{_format}',
'controller_action' => 'listBySocialAction',
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
],
'roles' => [
Request::METHOD_GET => 'ROLE_USER',
Request::METHOD_HEAD => 'ROLE_USER',
]
],
]
],
]
]);
}