feat: batch games and code refactor

This commit is contained in:
Zamitto 2024-06-16 23:43:18 -03:00
parent da5cc11bff
commit 7fc376b47f
10 changed files with 161 additions and 106 deletions

View file

@ -0,0 +1,11 @@
import { Game } from "@main/entity";
import { HydraApi } from "../hydra-api";
export const createGame = async (game: Game) => {
return HydraApi.post(`/games`, {
objectId: game.objectID,
playTimeInMilliseconds: Math.round(game.playTimeInMilliseconds),
shop: game.shop,
lastTimePlayed: game.lastTimePlayed,
});
};