Chore : various fixes
This commit is contained in:
+13
-1
@@ -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",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user