|
|
@ -44,7 +44,6 @@ $app->get('/', function (Request $request, Response $response) {
|
|
|
|
if (method_exists($gateway, $method)) {
|
|
|
|
if (method_exists($gateway, $method)) {
|
|
|
|
$ok = true;
|
|
|
|
$ok = true;
|
|
|
|
$rep = ((new $gateway)->$method($parameters));
|
|
|
|
$rep = ((new $gateway)->$method($parameters));
|
|
|
|
echo implode($rep);
|
|
|
|
|
|
|
|
$response->getBody()->write(json_encode($rep));
|
|
|
|
$response->getBody()->write(json_encode($rep));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}catch (PDOException $e){
|
|
|
|
}catch (PDOException $e){
|
|
|
@ -54,16 +53,6 @@ $app->get('/', function (Request $request, Response $response) {
|
|
|
|
if (!$ok){
|
|
|
|
if (!$ok){
|
|
|
|
throw new HttpNotFoundError($request);
|
|
|
|
throw new HttpNotFoundError($request);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|
|
$temp = array(0 => array("id" => "1",
|
|
|
|
|
|
|
|
"0" => "1",
|
|
|
|
|
|
|
|
"title" => "Votre avis nous intéresse !",
|
|
|
|
|
|
|
|
"1" => "Votre avis nous intéresse !",
|
|
|
|
|
|
|
|
"description" => "Ce formulaire vous permet de candidater à une potentielle interview si votre profil nous intéresse.",
|
|
|
|
|
|
|
|
"2" => "Ce formulaire vous permet de candidater à une potentielle interview si votre profil nous intéresse."
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
$response->getBody()->write(json_encode($temp));
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
return $response->withHeader('Content-type', 'application/json');
|
|
|
|
return $response->withHeader('Content-type', 'application/json');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|