|
|
@ -10,6 +10,10 @@ use Slim\Factory\AppFactory;
|
|
|
|
|
|
|
|
|
|
|
|
$app = AppFactory::create();
|
|
|
|
$app = AppFactory::create();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$app->addBodyParsingMiddleware();
|
|
|
|
|
|
|
|
$app->addRoutingMiddleware();
|
|
|
|
|
|
|
|
$app->addErrorMiddleware(true, true, true);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @OA\Get(path="/api/Inscrit",
|
|
|
|
* @OA\Get(path="/api/Inscrit",
|
|
|
|
* @OA\Response(response="200", description="Succes")
|
|
|
|
* @OA\Response(response="200", description="Succes")
|
|
|
@ -29,7 +33,13 @@ $app->get('/Inscrit/', function(Request $request, Response $response){
|
|
|
|
$db = null;
|
|
|
|
$db = null;
|
|
|
|
$response->getBody()->write(json_encode($inscrits));
|
|
|
|
$response->getBody()->write(json_encode($inscrits));
|
|
|
|
return $response
|
|
|
|
return $response
|
|
|
|
->withHeader('content-type', 'application/json')
|
|
|
|
->withHeader('content-type', 'a Textes complets
|
|
|
|
|
|
|
|
id nom prenom mail mdp
|
|
|
|
|
|
|
|
Éditer Éditer Copier Copier Supprimer Supprimer 1 EVARD LUCAS lucasevard@gmail.com test
|
|
|
|
|
|
|
|
Éditer Éditer Copier Copier Supprimer Supprimer 2 MONCUL STEPHANE stef@gmail.com teststef
|
|
|
|
|
|
|
|
Éditer Éditer Copier Copier Supprimer Supprimer 3 MENFOUMETTOITOUTNU RENAUD renaudtoutnu@gmail.com test000
|
|
|
|
|
|
|
|
Éditer Éditer Copier Copier Supprimer Supprimer 4 YOUVOI BENJAMIN BENJAMIN@gmail.com BENJAMIN
|
|
|
|
|
|
|
|
Éditer Éditer Copier Copier Supprimer Supprimer 5 TUBEAU RAOUL raoullacouille@gmail.com oui oui le culpplication/json')
|
|
|
|
->withStatus(200);
|
|
|
|
->withStatus(200);
|
|
|
|
} catch(PDOException $e){
|
|
|
|
} catch(PDOException $e){
|
|
|
|
$error = array("message" => $e->getMessage());
|
|
|
|
$error = array("message" => $e->getMessage());
|
|
|
@ -71,11 +81,8 @@ $app->post('/Inscrit/FromMail/', function(Request $request, Response $response,a
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$app->put('/Inscrit/UpdatePassword/', function(Request $request, Response $response, array $args){
|
|
|
|
$app->put('/Inscrit/UpdatePassword/', function(Request $request, Response $response, array $args){
|
|
|
|
$mail = $request->getParsedbody();
|
|
|
|
$mail = $request->getParsedBody()["email"];
|
|
|
|
$password = $request->getParsedBody()["password"];
|
|
|
|
$password = $request->getParsedBody()["password"];
|
|
|
|
|
|
|
|
|
|
|
|
var_dump($mail);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query = 'UPDATE Inscrit SET mdp=:password WHERE mail=:mail';
|
|
|
|
$query = 'UPDATE Inscrit SET mdp=:password WHERE mail=:mail';
|
|
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
try{
|
|
|
|