Final API version 4
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent 8dd9844608
commit abdc6a1d33

@ -45,7 +45,7 @@ $app->get('/', function (Request $request, Response $response) {
$ok = true; $ok = true;
$rep = (new $gateway)->$method($parameters); $rep = (new $gateway)->$method($parameters);
echo $rep; echo $rep;
$response->getBody()->write(json_encode("1")); #$response->getBody()->write(json_encode("1"));
} }
}catch (PDOException $e){ }catch (PDOException $e){
throw new PDOError($request,$e->getMessage(),$e); throw new PDOError($request,$e->getMessage(),$e);
@ -54,6 +54,7 @@ $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", $temp = array(0 => array("id" => "1",
"0" => "1", "0" => "1",
"title" => "Votre avis nous intéresse !", "title" => "Votre avis nous intéresse !",
@ -62,6 +63,7 @@ $app->get('/', function (Request $request, Response $response) {
"2" => "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)); $response->getBody()->write(json_encode($temp));
*/
return $response->withHeader('Content-type', 'application/json'); return $response->withHeader('Content-type', 'application/json');
}); });

Loading…
Cancel
Save