From 19600208777fef6bf19175c869d9924b5b03e716 Mon Sep 17 00:00:00 2001 From: viastolfi Date: Fri, 25 Nov 2022 18:05:00 +0100 Subject: [PATCH] test des routes --- Sources/API/index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/API/index.php b/Sources/API/index.php index dbdd788..100b2dd 100644 --- a/Sources/API/index.php +++ b/Sources/API/index.php @@ -6,13 +6,13 @@ require_once(__DIR__.'/config/Autoload.php'); Autoload::charger(); $router = new AltoRouter(); -$router->map('GET|POST',"/","test"); -$match=$router->match(); +$router->map( 'GET', '/', function() { + echo "OUIIIII"; +}); -if(!$match){echo "404"; die;} - -if($match){ - $cont = new Controller(); -} +// map user details page +$router->map( 'GET', '/test/', function() { + echo "NOOOOOOON"; +}); ?> \ No newline at end of file