From d3f50e82279a77919633545471657576e75debd6 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Wed, 4 Jan 2023 15:23:03 +0100 Subject: [PATCH] Bug fixed --- api-rest/gateways/userGateway.php | 1 + api-rest/index.php | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api-rest/gateways/userGateway.php b/api-rest/gateways/userGateway.php index 9366856..d67f457 100644 --- a/api-rest/gateways/userGateway.php +++ b/api-rest/gateways/userGateway.php @@ -38,6 +38,7 @@ class UserGateway{ $skinGateway=new SkinGateway($this->connection); $skinId=$row['FK_CURRENT_SKIN']; $skin=$skinGateway->getSkinById($skinId); + echo $ $usr= new User($row['PK_ID'], $row['USR_USERNAME'], $row['USR_PASSWORD'], diff --git a/api-rest/index.php b/api-rest/index.php index 2a24967..ea36d44 100644 --- a/api-rest/index.php +++ b/api-rest/index.php @@ -199,10 +199,11 @@ $password = !empty($url[6]) ? (string) $url[6] : null; $sexe = !empty($url[7]) ? (string) $url[7] : null; $nationality = !empty($url[8]) ? (string) $url[8] : null; - $nbCurrentCoins = !empty($url[9]) ? (int) $url[9] : null; - $totalnbCoins = !empty($url[10]) ? (int) $url[10] : null; - $nbGames = !empty($url[11]) ? (int) $url[11] : null; + $nbCurrentCoins = (int) $url[9]; + $totalnbCoins = (int) $url[10]; + $nbGames = (int) $url[11]; $currentSkin = !empty($url[12]) ? (int) $url[12] : null; + echo ($nbCurrentCoins . ' ' . $totalnbCoins . " ". $nbGames); $usergw->putUser($id,$username,$password,$sexe, $nationality, $nbCurrentCoins,$totalnbCoins,$nbGames,$currentSkin); http_response_code(200); }