Delete useless route
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent 36b19420e7
commit 786e3006da

@ -27,16 +27,8 @@ try{
$app->get('/', function (Request $request, Response $response) { $app->get('/', function (Request $request, Response $response) {
$parameters = $request->getQueryParams(); $parameters = $request->getQueryParams();
foreach ($parameters as $key => $value) { $method = $parameters['method'];
$response->getBody()->write("Key =>".$key.", value =>".$value); $response->getBody()->write($method);
}
return $response;
});
$app->get('/api/{method}', function (Request $request, Response $response, $args) {
$method = $args['method'];
$parameters = $request->getQueryParams();
$listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion"); $listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion");
foreach ($listGateway as $gateway) // Pour chaque Gateway foreach ($listGateway as $gateway) // Pour chaque Gateway
{ {
@ -45,8 +37,12 @@ try{
} }
} }
$response->getBody()->write("Use the method $method, with the parameters "); $response->getBody()->write("Use the method $method, with the parameters ");
foreach ($parameters as $key => $value) {
$response->getBody()->write("Key =>" . $key . ", value =>" . $value);
}
return $response; return $response;
}); });
// Run app // Run app
$app->run(); $app->run();
}catch (HttpNotFoundException|Exception $e){ }catch (HttpNotFoundException|Exception $e){

Loading…
Cancel
Save