From 43f58db4196ece08549c1adafb2ca0aa1ad02cf1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 27 Jun 2018 16:24:54 +0200 Subject: [PATCH] Typo fixes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- config/bundles.php | 2 +- src/Controller/PersonController.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/bundles.php b/config/bundles.php index e6cf935..17b973d 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -7,6 +7,6 @@ return [ Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], - Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], + Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], ]; diff --git a/src/Controller/PersonController.php b/src/Controller/PersonController.php index 1a68213..43b9078 100644 --- a/src/Controller/PersonController.php +++ b/src/Controller/PersonController.php @@ -54,7 +54,7 @@ class PersonController extends FOSRestController public function updatePersonAction(Request $request) { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository('App:Person')->find($request->get('id')); + $person = $em->getRepository('App::Person')->find($request->get('id')); if (empty($place)) { return new JsonResponse(['message' => 'Person not found'], Response::HTTP_NOT_FOUND); @@ -80,6 +80,7 @@ class PersonController extends FOSRestController /** * @Rest\Post("/person/{id}/localisation") + * @Rest\View(StatusCode = Response::HTTP_CREATED) */ public function updateLocalisationAction(Request $request) { @@ -101,7 +102,7 @@ class PersonController extends FOSRestController * name = "show_person", * requirements = {"id"="\d+"} * ) - * @Rest\View + * @Rest\View() */ public function showPerson(Person $person) { @@ -114,7 +115,7 @@ class PersonController extends FOSRestController * name = "show_person_by_email", * requirements = {"email"="\s+"} * ) - * @Rest\View + * @Rest\View() */ public function showPersonByEmail(Person $person) { -- 2.34.1