|
@@ -1,7 +1,9 @@
|
|
|
import {PUBLIC_API_URL} from "$env/static/public";
|
|
import {PUBLIC_API_URL} from "$env/static/public";
|
|
|
import {error} from "@sveltejs/kit";
|
|
import {error} from "@sveltejs/kit";
|
|
|
|
|
|
|
|
-export async function load({fetch, url}){
|
|
|
|
|
|
|
+export async function load({fetch, params}){
|
|
|
|
|
+ const {game_id} = params;
|
|
|
|
|
+
|
|
|
const response = await fetch(`${PUBLIC_API_URL}/game/${game_id}`, {
|
|
const response = await fetch(`${PUBLIC_API_URL}/game/${game_id}`, {
|
|
|
method: "GET",
|
|
method: "GET",
|
|
|
headers: {"Content-Type": "application/json"},
|
|
headers: {"Content-Type": "application/json"},
|