changement des routes
continuous-integration/drone/push Build is failing Details

API
Vincent ASTOLFI 2 years ago
parent bcb3a7ee78
commit ba9106a7de

@ -19,6 +19,10 @@
extract($row); extract($row);
$inscrit_item = array( $inscrit_item = array(
'id' => $id,
'nom' => $nom,
'prenom' => $prenom,
'mail' => $mail,
'mdp' => $mdp 'mdp' => $mdp
); );
array_push($inscrit_array, $inscrit_item); array_push($inscrit_array, $inscrit_item);

@ -7,12 +7,12 @@ $router->map( 'GET', '/', function(){
echo 'Hello World'; echo 'Hello World';
}); });
$router->map('GET','/Inscrit/read', function(){ $router->map('GET','/Inscrit', function(){
require(__DIR__.'/api/inscrit/read.php'); require(__DIR__.'/api/inscrit/read.php');
}); });
$router->map('GET','/Inscrit/read/mailToMdp/[*:mail]', function($mail){ $router->map('GET','/Inscrit/[*:mail]', function($mail){
require(__DIR__.'/api/inscrit/readMdpFromMail.php'); require(__DIR__.'/api/inscrit/readFromMail.php');
}); });
$match = $router->match(); $match = $router->match();

@ -33,6 +33,10 @@
public function readMdpFromMail($mail){ public function readMdpFromMail($mail){
$query = 'SELECT $query = 'SELECT
i.id as id,
i.nom as nom,
i.prenom as prenom,
i.mail as mail,
i.mdp as mdp i.mdp as mdp
FROM FROM
'.$this->table.' i '.$this->table.' i

Loading…
Cancel
Save