From 7ee5ca0753c685ffff76f47e739414a93f9888df Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 11 May 2021 16:03:11 +0200 Subject: [PATCH] address selection: add API points for PostalCode and Country --- .../ChillMainExtension.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index eaf7711d3..277e916a8 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -288,6 +288,46 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface, ] ], ] + ], + [ + 'class' => \Chill\MainBundle\Entity\PostalCode::class, + 'name' => 'postal_code', + 'base_path' => '/api/1.0/main/postal-code', + 'base_role' => 'ROLE_USER', + 'actions' => [ + '_index' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true + ], + ], + '_entity' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true + ] + ], + ] + ], + [ + 'class' => \Chill\MainBundle\Entity\Country::class, + 'name' => 'country', + 'base_path' => '/api/1.0/main/country', + 'base_role' => 'ROLE_USER', + 'actions' => [ + '_index' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true + ], + ], + '_entity' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true + ] + ], + ] ] ] ]);