mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
creation of endpoints POST, PUT, PATCH, but still errors
This commit is contained in:
@@ -59,7 +59,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
|
||||
'class' => \Chill\ThirdPartyBundle\Entity\ThirdParty::class,
|
||||
'name' => 'thirdparty',
|
||||
'base_path' => '/api/1.0/thirdparty/thirdparty',
|
||||
'base_role' => \Chill\ThirdPartyBundle\Security\Authorization\ThirdPartyVoter::class,
|
||||
//'base_role' => \Chill\ThirdPartyBundle\Security\Authorization\ThirdPartyVoter::SHOW,
|
||||
//'controller' => \Chill\ThirdPartyBundle\Controller\ThirdPartyApiController::class,
|
||||
'actions' => [
|
||||
'_index' => [
|
||||
@@ -67,19 +67,31 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
Request::METHOD_POST => true,
|
||||
Request::METHOD_PATCH => true,
|
||||
Request::METHOD_PUT => true
|
||||
],
|
||||
'roles' => [
|
||||
Request::METHOD_GET => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_HEAD => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_POST => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PUT => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PATCH => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE
|
||||
],
|
||||
],
|
||||
'_entity' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
Request::METHOD_POST=> true,
|
||||
Request::METHOD_POST => true,
|
||||
Request::METHOD_PUT => true,
|
||||
Request::METHOD_PATCH => true
|
||||
],
|
||||
'roles' => [
|
||||
Request::METHOD_GET => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_HEAD => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_POST => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
|
||||
|
||||
Request::METHOD_PUT => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PATCH => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE
|
||||
],
|
||||
]
|
||||
]
|
||||
|
Reference in New Issue
Block a user