forked from antux18/ChasseTresorPange
Modifications du JS liées à l'emplacement de la racine du site.
This commit is contained in:
parent
67c9d32593
commit
60def31d70
@ -1,3 +1,5 @@
|
|||||||
|
var subdomain = ""; // À modifier sur le serveur
|
||||||
|
|
||||||
// Gestion de la langue :
|
// Gestion de la langue :
|
||||||
var url_string = window.location.href;
|
var url_string = window.location.href;
|
||||||
var url = new URL(url_string);
|
var url = new URL(url_string);
|
||||||
@ -24,7 +26,7 @@ if (lg == "fr") {
|
|||||||
|
|
||||||
export async function puzzleSolve(code, team_id, art_id) {
|
export async function puzzleSolve(code, team_id, art_id) {
|
||||||
try {
|
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();
|
const data = await response.json();
|
||||||
if (data["valid_qr"]) {
|
if (data["valid_qr"]) {
|
||||||
location.reload();
|
location.reload();
|
||||||
|
Loading…
Reference in New Issue
Block a user