mirror of
https://github.com/BreizhHardware/ProjetS4COMWEB.git
synced 2026-03-28 02:09:47 +01:00
Merge branch 'main' into cfouche
This commit is contained in:
@@ -5,6 +5,8 @@ require_once '../php/constants.php';
|
||||
require_once '../php/db/dbconnect.php';
|
||||
require_once '../php/db/Search.php';
|
||||
require_once '../php/db/Login.php';
|
||||
require_once '../php/db/Calendrier.php';
|
||||
require_once 'test/database.php';
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
$pdo = dbConnect();
|
||||
@@ -16,22 +18,44 @@ $router->GET('/api/requests', ["test"], function($test){
|
||||
echo json_encode($test);
|
||||
});
|
||||
|
||||
$router->GET('/api/search', ["type"], function($type){
|
||||
$router->GET('/api/search-type', ["type"], function($type){
|
||||
global $pdo;
|
||||
searchDoctor($pdo, $type);
|
||||
});
|
||||
|
||||
/*
|
||||
$router->GET('/api/search', ["type", "location"], function($type, $location){
|
||||
$router->GET('/api/search-postal', ["postal"], function($postal){
|
||||
global $pdo;
|
||||
searchDoctorByLocation($pdo, $location, $type);
|
||||
searchDoctorByLocation($pdo, $postal);
|
||||
});
|
||||
|
||||
$router->GET('/api/search', ["location"], function($location){
|
||||
$router->GET('/api/search', ["type", "postal"], function($type, $postal){
|
||||
global $pdo;
|
||||
searchDoctorByLocation($pdo, $location);
|
||||
searchDoctorByLocation($pdo, $postal, $type);
|
||||
})
|
||||
|
||||
$router->GET('/api/rdv', ["id"], function($id){
|
||||
global $pdo;
|
||||
getNumberOfRDVByMedecin($pdo, $id);
|
||||
});
|
||||
|
||||
$router->GET('/api/rdv-available', ["id"], function($id){
|
||||
global $pdo;
|
||||
selectRDVTimeByID($pdo, $id);
|
||||
});
|
||||
|
||||
$router->GET('/api/rdv-date', ["date", "id"], function($date, $id){
|
||||
global $pdo;
|
||||
selectRDVForDate($pdo, $date, $id);
|
||||
});
|
||||
|
||||
$router->GET('/api/praticien', ["id"], function($id){
|
||||
global $pdo;
|
||||
getPraticienDetails($pdo, $id);
|
||||
});
|
||||
|
||||
$router->PUT('/api/rdv', ["rdv_id", "patient_id"], function($rdv_id, $patient_id){
|
||||
global $pdo;
|
||||
takeRDV($pdo, $rdv_id, $patient_id);
|
||||
});
|
||||
*/
|
||||
$router->POST('/api/requests', ["test"], function($test){
|
||||
echo json_encode($test);
|
||||
});
|
||||
@@ -53,4 +77,31 @@ $router->DELETE('/api/requests', ["test"], function($test){
|
||||
echo json_encode($test);
|
||||
});
|
||||
|
||||
$router->GET('/api/rdv-praticient', ["id"], function($id){
|
||||
global $pdo;
|
||||
dbRequestRdvPraticien($pdo, $id);
|
||||
getAllLieux($pdo);
|
||||
});
|
||||
|
||||
$router->GET('/api/rdv-patient', ["id"], function($id){
|
||||
global $pdo;
|
||||
dbRequestRdvPatient($pdo, $id);
|
||||
getPastRdvByPatient($pdo, $id);
|
||||
});
|
||||
|
||||
$router->DELETE('/api/delete-empty', ["id"], function($id){
|
||||
global $pdo;
|
||||
DeleteEmptyRdv($pdo, $id);
|
||||
});
|
||||
|
||||
$router->DELETE('/api/cancel-rdv', ["id"], function($id){
|
||||
global $pdo;
|
||||
CancelRDV($pdo, $id);
|
||||
});
|
||||
|
||||
$router->POST('/api/create-rdv', ["id", "date", "time", "lieu"], function($id, $date, $time, $lieu){
|
||||
global $pdo;
|
||||
createRDV($pdo, $id, $date, $time, $lieu);
|
||||
});
|
||||
|
||||
$router->run();
|
||||
|
||||
Reference in New Issue
Block a user