Chore : various fixes

This commit is contained in:
2024-07-14 14:49:05 +02:00
parent fde462166c
commit 8dc263ab50
5 changed files with 147 additions and 58 deletions
+13 -1
View File
@@ -127,7 +127,7 @@ export async function buyGem(game: string) {
export async function useToken(
game: string,
tokenId: string,
cardId: string,
cardId?: string,
playerId?: string
) {
const config = useRuntimeConfig();
@@ -209,3 +209,15 @@ export async function damageChampion(
}
);
}
export async function discardCard(game: string, cardId: string) {
const config = useRuntimeConfig();
await $fetch(
new URL(`games/${game}/turn/discardCard/${cardId}`, config.public.endpoint)
.href,
{
method: "POST",
credentials: "include",
}
);
}