From b7d457009658db650c53f12d7eca2deaec22a18d Mon Sep 17 00:00:00 2001 From: sinbad Date: Mon, 8 Apr 2024 09:22:30 +0200 Subject: [PATCH] =?UTF-8?q?Petite=20avanc=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/API/requests.php | 6 +++--- src/API/test/database.php | 2 +- src/js/AJAX/index.js | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/API/requests.php b/src/API/requests.php index ec914ce..f044578 100644 --- a/src/API/requests.php +++ b/src/API/requests.php @@ -30,7 +30,7 @@ $router->GET('/api/search-postal', ["postal"], function($postal){ $router->GET('/api/search', ["type", "postal"], function($type, $postal){ global $pdo; searchDoctorByLocation($pdo, $postal, $type); -}) +}); $router->GET('/api/rdv', ["id"], function($id){ global $pdo; @@ -99,9 +99,9 @@ $router->DELETE('/api/cancel-rdv', ["id"], function($id){ CancelRDV($pdo, $id); }); -$router->POST('/api/create-rdv', ["id", "date", "time", "lieu"], function($id, $date, $time, $lieu){ +$router->POST('/api/create-rdv', ["medID", "date", "time", "lieu"], function($medID, $date, $time, $lieu){ global $pdo; - createRDV($pdo, $id, $date, $time, $lieu); + CreateRDV($pdo, $medID, $date, $time, $lieu); }); $router->run(); diff --git a/src/API/test/database.php b/src/API/test/database.php index 4c3447d..d596c37 100644 --- a/src/API/test/database.php +++ b/src/API/test/database.php @@ -99,7 +99,7 @@ function getLieuID($pdo, $adress, $postal, $city){ } function getAllLieux($pdo){ - $statement = $pdo->prepare("SELECT l_adress, l_city, l_postal FROM lieu"); + $statement = $pdo->prepare("SELECT l_adress, l_city, l_postal FROM lieu ORDER BY l_postal ASC"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); diff --git a/src/js/AJAX/index.js b/src/js/AJAX/index.js index 96a5eec..3d0bd23 100644 --- a/src/js/AJAX/index.js +++ b/src/js/AJAX/index.js @@ -373,6 +373,8 @@ function ButtonShowRdvPraticient() { }); } + + //End Call ButtonShowRdvPraticient();