mirror of
https://github.com/BreizhHardware/ProjetS4COMWEB.git
synced 2026-01-18 16:47:35 +01:00
Fix
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
require_once "database.php";
|
||||
$PDO = dbConnect();
|
||||
$request = substr($_SERVER['PATH_INFO'], 1);
|
||||
$request = explode('/', $request);
|
||||
$requestRessource = array_shift($request);
|
||||
$method = $_SERVER["REQUEST_METHOD"];
|
||||
|
||||
parse_str(file_get_contents('php://input'), $_PUT);
|
||||
|
||||
if($method === "GET" && isset($_GET)){ // Want tweets of a specific user
|
||||
$rdvOfPraticien = dbRequestRdvPraticien($PDO, $_GET["login"]);
|
||||
echo json_encode($rdvOfPraticien);
|
||||
}
|
||||
|
||||
if($method === "POST" && isset($_POST)){
|
||||
$success = CreateRDV($PDO, $_POST["login"], $_POST["date"], $_POST["time"], $_POST["lieu"]);
|
||||
echo json_encode($success);
|
||||
}
|
||||
|
||||
if($method === "DELETE" && isset($_GET)){
|
||||
$id = array_shift($request);
|
||||
$success = DeleteEmptyRdv($PDO, $_GET["rdv"]);
|
||||
echo json_encode($success);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user