From 6282648ab6f0d73a0adbed6514efb59ee8b70106 Mon Sep 17 00:00:00 2001 From: arzumify Date: Mon, 24 Mar 2025 21:21:52 +0000 Subject: [PATCH] Fixed broken betting --- templates/admin.html | 2 +- templates/bet.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/admin.html b/templates/admin.html index ab725d9..daf7d92 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -38,7 +38,7 @@ let response = await fetch("/api/endBet", { method: "POST", body: JSON.stringify({ - "correct": possible.index(prompt("What was the correct answer?")) + "correct": possible.indexOf(prompt("What was the correct answer?")) }) }) if (response.ok) { diff --git a/templates/bet.html b/templates/bet.html index e0adc36..4a9a192 100644 --- a/templates/bet.html +++ b/templates/bet.html @@ -40,6 +40,7 @@ document.getElementById("question").innerText = data.question; outcomes = data.possible; document.getElementById("possible").innerText = "Possible outcomes: " + outcomes.join(", "); + document.getElementById("bet").disabled = false; // noinspection ES6MissingAwait updateTimer(data.timeToBet); } else {