Commit 3c9f0a3a authored by Mat's avatar Mat

[non testé] groupes de serialization

parent 956007af
......@@ -246,7 +246,7 @@ class LegumeAPIController extends MasterAPIController
{
$em->persist($offrelegumes);
$em->flush();
return $this->api($offrelegumes);
return $this->api($offrelegumes, 200, array('readOffreLegumes'));
}
return $this->api($form, Response::HTTP_BAD_REQUEST);
}
......
......@@ -58,7 +58,7 @@ class OffreAPIController extends MasterAPIController
$em = $this->getDoctrine()->getManager();
$em->persist($offre);
$em->flush(); // TODO bug -> Notice: Array to string conversion
return $this->api($offre);
return $this->api($offre, 200, array('readOffres'));
}
return $this->api($form , Response::HTTP_BAD_REQUEST);
}
......@@ -89,7 +89,7 @@ class OffreAPIController extends MasterAPIController
if ($offre === null) {
return $this->api('Not found', Response::HTTP_NOT_FOUND);
}
return $this->api($offre);
return $this->api($offre, 200, array('readOffres'));
}
......@@ -114,7 +114,7 @@ class OffreAPIController extends MasterAPIController
if ($form->isSubmitted() && $form->isValid())
{
$em->flush();
return $this->api($offre);
return $this->api($offre, 200, array('readOffres'));
}
return $this->api($form, Response::HTTP_BAD_REQUEST);
}
......@@ -141,7 +141,7 @@ class OffreAPIController extends MasterAPIController
if ($form->isSubmitted() && $form->isValid())
{
$em->flush();
return $this->api($offre);
return $this->api($offre, 200, array('readOffres'));
}
return $this->api($form, Response::HTTP_BAD_REQUEST);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment