From 23d4df229942b6e46b37058c04671b47e994f5bc Mon Sep 17 00:00:00 2001 From: Whykioh Date: Thu, 19 Mar 2026 13:43:42 +0100 Subject: [PATCH] sdfghn --- poker-paf/Js/admin-game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poker-paf/Js/admin-game.js b/poker-paf/Js/admin-game.js index 241a11d..90f306b 100644 --- a/poker-paf/Js/admin-game.js +++ b/poker-paf/Js/admin-game.js @@ -34,13 +34,13 @@ async function SqlRequest(action, params = {}) { // Fonctions pour démarrer la page window.onload = async function() { - SqlRequest('is_admin').then(result => { + const result = await SqlRequest('is_admin'); console.log("Vérification des droits administrateur :", result); if (!result.is_admin) { alert("Vous n'avez pas les droits pour accéder à cette page."); window.location.href = 'index.html'; } - }); + } gameData = await getGame(); playersData = await getPlayers();