fet : add game delete

This commit is contained in:
2024-12-31 12:37:57 +01:00
parent 9eaf7009c6
commit 201381342c
3 changed files with 36 additions and 12 deletions
+10
View File
@@ -58,6 +58,16 @@ export const useGameStore = defineStore("game", {
}
);
},
async deleteGame(id: number) {
const config = useRuntimeConfig();
const data = await $fetch<GameResponseDTO>(
config.public.endpoint + `/games/` + id,
{
method: "DELETE",
credentials: "include",
}
);
},
async getCurrentWord(id: number) {
const config = useRuntimeConfig();
const data = await $fetch<string>(