Files
front/service/game.service.ts
T
2024-12-29 22:06:57 +01:00

14 lines
331 B
TypeScript

import type { GameResponseDTO } from "~/netcode/events/dto/gameresponse.dto";
export async function getGames() {
const config = useRuntimeConfig();
const data = await useFetch<GameResponseDTO[]>(
config.public.endpoint + `/games`,
{
credentials: "include",
immediate: true,
}
);
return data.data
}