repositories
/
Project_proches_de_moi-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the localisations resssource.
[Project_proches_de_moi-server.git]
/
src
/
Controller
/
PersonController.php
diff --git
a/src/Controller/PersonController.php
b/src/Controller/PersonController.php
index b452c6360093b108b2f42b373311d7bf5cd42381..f2e73c132454b5e4d3bf98fc763ab7f121b7fe0f 100644
(file)
--- a/
src/Controller/PersonController.php
+++ b/
src/Controller/PersonController.php
@@
-85,16
+85,16
@@
class PersonController extends Controller
/**
* @Rest\Get("/api/person/{id}/localisations")
*/
/**
* @Rest\Get("/api/person/{id}/localisations")
*/
- public function getLocalisation
Actions
(Request $request)
+ public function getLocalisation
sAction
(Request $request)
{
$em = $this->getDoctrine()->getManager();
{
$em = $this->getDoctrine()->getManager();
- $localisations = $em->getRepository('App:Localisation')->findBy(['person
_id
' => $request->get('id')]);
+ $localisations = $em->getRepository('App:Localisation')->findBy(['person' => $request->get('id')]);
if (empty($localisations)) {
if (empty($localisations)) {
- return View::create(['message' => 'Person localisation not found'], Response::HTTP_NOT_FOUND);
+ return View::create(['message' => 'Person localisation
s
not found'], Response::HTTP_NOT_FOUND);
}
}
- $view = View::create($localisation);
+ $view = View::create($localisation
s
);
$view->setFormat('json');
$viewHandler = $this->get('fos_rest.view_handler');
$view->setFormat('json');
$viewHandler = $this->get('fos_rest.view_handler');