Test
continuous-integration/drone/push Build is failing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent 05ceffca26
commit ed6aa54a3e

@ -468,7 +468,7 @@ class UserController
global $rep, $vues, $error;
$model = new UserModel();
$idPartie = $_SESSION['idPartie'];
$lesJoueurs = $model->getPlayersEmail($idPartie);
$lesJoueurs = $model->getLesJoueurs($idPartie);
$lesJoueurs = json_encode($lesJoueurs);
echo ($lesJoueurs);
}

@ -294,9 +294,6 @@ class UserModel
}
return $lesPseudos;
}
public function getPlayersEmail(int $idPartie) : array{
return $this->partie_gateway->getLesMailJoueurs($idPartie);
}
public function getPlayerScore(string $mailUtilisateur,int $idPartie) : array{
global $playerNumberPerGame;
$score = array();

@ -1,13 +1,13 @@
function dashboard () {
// var xhr = new XMLHttpRequest();
// xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayersEmail', true);
// xhr.responseType = 'text';
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
// var playersEmail = xhr.onload = function () {
// console.log(xhr.responseText + "DONE");
// return JSON.parse(xhr.responseText);
// };
// xhr.send(null);
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayersEmail', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var playersEmail = xhr.onload = function () {
console.log(xhr.responseText);
return JSON.parse(xhr.responseText);
};
xhr.send(null);
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayersPseudo', true);
xhr.responseType = 'text';

Loading…
Cancel
Save