diff --git a/Source/API/script/ExceptionHandle/TypeErrorMethod.php b/Source/API/script/ExceptionHandle/TypeErrorMethod.php index 4f2fc51..d5450ec 100644 --- a/Source/API/script/ExceptionHandle/TypeErrorMethod.php +++ b/Source/API/script/ExceptionHandle/TypeErrorMethod.php @@ -10,7 +10,7 @@ class TypeErrorMethod extends HttpSpecializedException { protected $code = 400; protected string $title = "Method is not specified"; - protected $message = "Bad Parameters, The API need a 'method' args in URL. Exemple :'http://url/method=getSomething'"; + protected $message = "Bad Parameters, The API need a 'method' args in URL. Exemple :'http://url/api/getSomething'"; public function __construct(ServerRequestInterface $request,?Throwable $previous = null) { diff --git a/Source/API/script/index.php b/Source/API/script/index.php index 0bb79ce..2604693 100644 --- a/Source/API/script/index.php +++ b/Source/API/script/index.php @@ -34,7 +34,7 @@ $app->get('/', function (Request $request, Response $response){ throw new TypeErrorMethod($request); }); -$app->get('/{method}', function (Request $request, Response $response, array $args) { +$app->get('/api/{method}', function (Request $request, Response $response, array $args) { $parameters = $request->getQueryParams(); $method = $args['method']; $listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion");