From 1ca21395c0b072c0aee849c539a20f214284254a Mon Sep 17 00:00:00 2001 From: Whykioh Date: Mon, 30 Mar 2026 20:42:01 +0200 Subject: [PATCH] fix some paths issues --- yahtzee/js/config.js | 4 ++-- yahtzee/js/game.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yahtzee/js/config.js b/yahtzee/js/config.js index 5dac64f..54bd118 100644 --- a/yahtzee/js/config.js +++ b/yahtzee/js/config.js @@ -32,7 +32,7 @@ function updatePlayerInputs() { async function SqlRequest(action, params = {}) { try { - const response = await fetch('RequestsHandler.php', { + const response = await fetch('../RequestsHandler.php', { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -92,7 +92,7 @@ loginForm.addEventListener('submit', async function(event) { // 4. Redirection vers la table de jeu console.log("Partie créée avec succès, ID:", gameId); - window.location.href = '../game.html?game_id=' + gameId; + window.location.href = '../game/index.html?game_id=' + gameId; } else { console.error("Erreur lors de la création de la partie :", response?.error); diff --git a/yahtzee/js/game.js b/yahtzee/js/game.js index 34683b8..ed11a5d 100644 --- a/yahtzee/js/game.js +++ b/yahtzee/js/game.js @@ -1,6 +1,6 @@ async function SqlRequest(action, params = {}) { try { - const response = await fetch('RequestsHandler.php', { + const response = await fetch('../RequestsHandler.php', { method: 'POST', headers: { 'Content-Type': 'application/json'