X-Git-Url: https://git.piment-noir.org/?p=Project_proches_de_moi-server.git;a=blobdiff_plain;f=src%2FController%2FPersonController.php;h=43b907874e1eadfdda520c44ccfa0a70bc627a1c;hp=1a6821335bad4f2715b2a16dd788982940ada456;hb=43f58db4196ece08549c1adafb2ca0aa1ad02cf1;hpb=73860922259915d0966281384d8efdb97d259a45 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) {