Merge pull request #16 from BreizhHardware/Yanis

Petite avancée
This commit is contained in:
YanisRff
2024-04-08 09:23:10 +02:00
committed by GitHub
3 changed files with 6 additions and 4 deletions

View File

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

View File

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

View File

@@ -373,6 +373,8 @@ function ButtonShowRdvPraticient() {
});
}
//End Call
ButtonShowRdvPraticient();