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; global $rep, $vues, $error;
$model = new UserModel(); $model = new UserModel();
$idPartie = $_SESSION['idPartie']; $idPartie = $_SESSION['idPartie'];
$lesJoueurs = $model->getPlayersEmail($idPartie); $lesJoueurs = $model->getLesJoueurs($idPartie);
$lesJoueurs = json_encode($lesJoueurs); $lesJoueurs = json_encode($lesJoueurs);
echo ($lesJoueurs); echo ($lesJoueurs);
} }

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

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

Loading…
Cancel
Save