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