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

Loading…
Cancel
Save