Init game page

This commit is contained in:
2024-05-12 13:12:13 +04:00
parent 275d99bd85
commit 15247adfa3
9 changed files with 88 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
import { HTTPService } from "@/shared/http/httpService";
import { gameCardsSchema, GameCardType } from "./schemas/gameCard";
import { gameSchema, GameType } from "./schemas/game";
export abstract class GameService {
public static async getGameCards() {
@@ -8,4 +9,7 @@ export abstract class GameService {
gameCardsSchema
);
}
public static async getGame(id: number) {
return await HTTPService.get<GameType>(`/games/${id}`, gameSchema);
}
}