From c5482ddfb4074884a14bc5e8e4caffab61a9f572 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Tue, 10 Jan 2023 09:26:43 +0100 Subject: [PATCH] toujours pareil --- api-rest/index.php | 3 +-- api-rest/initBdd.php | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api-rest/index.php b/api-rest/index.php index 1d1906c..1413671 100644 --- a/api-rest/index.php +++ b/api-rest/index.php @@ -83,7 +83,7 @@ echo json_encode($url); - $method_name = !empty($url[3]) ? (string)$url[3] : null; + $method_name = !empty($url[2]) ? (string)$url[2] : null; if($method_name == null){ //header("HTTP/1.0 400 Request Name Empty"); http_response_code(400); @@ -134,7 +134,6 @@ http_response_code(200); } elseif($method_name === "getGames"){ // test : OK - echo "salut"; $tabGame = $gamegw->getGames(); header('Content-Type: application/json'); echo json_encode($tabGame, JSON_PRETTY_PRINT); diff --git a/api-rest/initBdd.php b/api-rest/initBdd.php index 7edc666..25f3add 100644 --- a/api-rest/initBdd.php +++ b/api-rest/initBdd.php @@ -1,7 +1,5 @@ query("CREATE TABLE `T_J_OWN_SKIN_OWN` (