Remove all api endpoints from frontend project

This commit is contained in:
Pablu23
2025-10-10 10:36:08 +02:00
parent 5dda281985
commit 9a44b91099
13 changed files with 87 additions and 258 deletions

View File

@@ -1,18 +0,0 @@
import { redirect } from "@sveltejs/kit";
import type { PageServerLoad } from "./$types";
export const load: PageServerLoad = async ({locals, fetch}) => {
const response = await fetch("/api/createLobby", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(locals.user)
});
if (!response.ok) redirect(307, "/error");
const lobby = await response.json();
redirect(307, `/lobby/${lobby.id}`);
};