add base api url for ws

This commit is contained in:
Lilian 2023-02-28 10:42:03 +01:00 committed by Kilton937342
parent 6ce6a19acf
commit 00284a2298

View File

@ -18,6 +18,7 @@
import Challenge from "../../../components/rooms/Challenge.svelte";
import { refreshRequest } from "../../../requests/auth.request";
import Waiting from "../../../components/rooms/Waiting.svelte";
import { env } from "$env/dynamic/public";
const p = "p";
@ -26,7 +27,7 @@
const room = writable<Room | null>(null);
const member = writable<Member | null>(null);
const parcours = writable<ParcoursRead | null>(null);
const ws = connect("ws://127.0.0.1:8002/api/ws/room/" + $page.params.slug);
const ws = connect(`${env.PUBLIC_API_BASE}api/ws/room/${$page.params.slug}`);
setContext("room", room);
setContext("member", member);