From 60def31d70b1899f2b02293de89e953d6519d6a0 Mon Sep 17 00:00:00 2001 From: antux18 Date: Sat, 2 Sep 2023 01:07:45 -0400 Subject: [PATCH] =?UTF-8?q?Modifications=20du=20JS=20li=C3=A9es=20=C3=A0?= =?UTF-8?q?=20l'emplacement=20de=20la=20racine=20du=20site.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- require/js/answer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/require/js/answer.js b/require/js/answer.js index 0395bef..40bcd9e 100644 --- a/require/js/answer.js +++ b/require/js/answer.js @@ -1,3 +1,5 @@ +var subdomain = ""; // À modifier sur le serveur + // Gestion de la langue : var url_string = window.location.href; var url = new URL(url_string); @@ -24,7 +26,7 @@ if (lg == "fr") { export async function puzzleSolve(code, team_id, art_id) { try { - const response = await fetch(url.origin + "/answer.php?lg=" + lg + "&team=" + team_id + "&code=" + code + "&id=" + art_id); + const response = await fetch(url.origin + "/" + subdomain + "answer.php?lg=" + lg + "&team=" + team_id + "&code=" + code + "&id=" + art_id); const data = await response.json(); if (data["valid_qr"]) { location.reload();