}
/**
+ * @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);
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);