Typo fixes.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 27 Jun 2018 14:24:54 +0000 (16:24 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 27 Jun 2018 14:24:54 +0000 (16:24 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
config/bundles.php
src/Controller/PersonController.php

index e6cf935e3509d2918a18463766ddb5f59ec43974..17b973dd981d313e74ad69ea2675093fc355a774 100644 (file)
@@ -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],
 ];
index 1a6821335bad4f2715b2a16dd788982940ada456..43b907874e1eadfdda520c44ccfa0a70bc627a1c 100644 (file)
@@ -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)
   {