ajout de routes
continuous-integration/drone/push Build is failing Details

API
Vincent ASTOLFI 2 years ago
parent ba9106a7de
commit 7167670b92

@ -0,0 +1,3 @@
<?php
var_dump($test)
?>

@ -3,7 +3,7 @@
header('Content-Type: application/json');
include_once (__DIR__.'/../../config/Database.php');
include_once (__DIR__.'/../../models/Inscrit.php');
include_once (__DIR__.'/../../gateways/Inscrit.php');
$database = new Database();
$db = $database->connect();

@ -7,7 +7,7 @@ $router->map( 'GET', '/', function(){
echo 'Hello World';
});
$router->map('GET','/Inscrit', function(){
$router->map('GET|POST','/Inscrit', function(){
require(__DIR__.'/api/inscrit/read.php');
});
@ -15,6 +15,10 @@ $router->map('GET','/Inscrit/[*:mail]', function($mail){
require(__DIR__.'/api/inscrit/readFromMail.php');
});
$router->match('POST|GET','/Inscrit/add', function(){
require(__DIR__.'/api/Inscrit/add.php');
});
$match = $router->match();
if($match!=null) {

Loading…
Cancel
Save