Fixed broken betting
This commit is contained in:
parent
5cbb637890
commit
6282648ab6
2 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue