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();