fix!
This commit is contained in:
parent
d584e58207
commit
42b9e59ed7
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,9 @@ import { QuestionsData, wait } from "./create.svelte.js";
|
||||||
import toast from "svelte-5-french-toast";
|
import toast from "svelte-5-french-toast";
|
||||||
|
|
||||||
export async function createGame() {
|
export async function createGame() {
|
||||||
|
if (wait.v) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
wait.v = true;
|
wait.v = true;
|
||||||
const gamePin = Math.floor(Math.random() * 1000000)
|
const gamePin = Math.floor(Math.random() * 1000000)
|
||||||
.toString()
|
.toString()
|
||||||
|
@ -12,7 +15,7 @@ export async function createGame() {
|
||||||
gameid: gamePin,
|
gameid: gamePin,
|
||||||
questionstext: q.questionText,
|
questionstext: q.questionText,
|
||||||
correctanswer: q.CorrectOption.SingleAnswer,
|
correctanswer: q.CorrectOption.SingleAnswer,
|
||||||
timeLimit: q.TimeLimit,
|
timeLimit: q.timelimit,
|
||||||
media: q.hasMedia ? q.mediaURL : null,
|
media: q.hasMedia ? q.mediaURL : null,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue