mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
11 lines
333 B
TypeScript
11 lines
333 B
TypeScript
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.trunc(game.playTimeInMilliseconds),
|
|
shop: game.shop,
|
|
lastTimePlayed: game.lastTimePlayed,
|
|
});
|
|
};
|