Feat : add surrender button
release-tag / release-image (push) Successful in 51s

This commit is contained in:
2024-08-27 13:08:15 +02:00
parent b5d89d4fe9
commit 29cd28953d
2 changed files with 31 additions and 9 deletions
+11
View File
@@ -80,6 +80,17 @@ export async function leaveGame(game: string) {
);
}
export async function surrender(game: string) {
const config = useRuntimeConfig();
const res = await $fetch<Game>(
config.public.endpoint + `/games/${game}/surrender`,
{
method: "POST",
credentials: "include",
}
);
}
export async function kickPlayer(game: string, playerId: string) {
const config = useRuntimeConfig();
const res = await $fetch<Game>(