Added Kahoot!-Mode

This commit is contained in:
Mawoka
2022-09-17 22:32:18 +02:00
parent 4f2478c8e5
commit 1651cd7b2c
16 changed files with 161 additions and 28 deletions
+4 -1
View File
@@ -13,6 +13,7 @@
const { t } = getLocalization();
export let game_pin: string;
export let game_mode;
let username = '';
let hcaptchaSitekey = import.meta.env.VITE_HCAPTCHA;
@@ -54,8 +55,10 @@
let captcha_resp: string;
const res = await fetch(`/api/v1/quiz/play/check_captcha/${game_pin}`);
let captcha_enabled;
const json = await res.json();
game_mode = json.game_mode;
if (res.status === 200) {
captcha_enabled = (await res.json()).enabled;
captcha_enabled = json.enabled;
}
if (res.status === 404) {
alertModal.set({