🐛 Fixed play-screen when joining via the QR-code

This commit is contained in:
Mawoka
2022-11-06 15:28:02 +01:00
parent 66797f511a
commit 32e0c93b7d
+10 -1
View File
@@ -54,7 +54,16 @@
});
const set_game_pin = async () => {
const res = await fetch(`/api/v1/quiz/play/check_captcha/${game_pin}`);
let process_var;
try {
process_var = process;
} catch {
process_var = { env: { API_URL: undefined } };
}
const res = await fetch(
`${process_var.env.API_URL ?? ''}/api/v1/quiz/play/check_captcha/${game_pin}`
);
const json = await res.json();
game_mode = json.game_mode;
if (res.status === 200) {