X-Git-Url: https://git.piment-noir.org/?p=Project_proches_de_moi-server.git;a=blobdiff_plain;f=src%2FController%2FPersonController.php;h=6ee3fdfc52ba561a8c42e872b1820e9abf35ed57;hp=af3c28a95e4ced170dac009a82e1826aa81fc01e;hb=9e71bdc54747a36c661ce304a330a2d6dc43b80c;hpb=98f8520783f01754efaddb692cddb77e9fc236f3 diff --git a/src/Controller/PersonController.php b/src/Controller/PersonController.php index af3c28a..6ee3fdf 100644 --- a/src/Controller/PersonController.php +++ b/src/Controller/PersonController.php @@ -98,17 +98,17 @@ class PersonController extends FOSRestController } /** + * @Rest\View() * @Rest\Get( * path = "/api/person/{id}", * name = "show_person", * requirements = {"id"="\d+"} * ) - * @Rest\View() */ public function showPerson(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($person)) { return new JsonResponse(['message' => 'Person not found'], Response::HTTP_NOT_FOUND); @@ -148,7 +148,7 @@ class PersonController extends FOSRestController public function showPersonFriends(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($person)) { return new JsonResponse(['message' => 'Person not found'], Response::HTTP_NOT_FOUND);