This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user