mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 03:32:13 +00:00
missing parse to int in put /games/:gameId
This commit is contained in:
parent
7eb69f6e16
commit
cf84bf56b3
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ import { HydraApi } from "../hydra-api";
|
|||
export const createGame = async (game: Game) => {
|
||||
return HydraApi.post(`/games`, {
|
||||
objectId: game.objectID,
|
||||
playTimeInMilliseconds: Math.round(game.playTimeInMilliseconds),
|
||||
playTimeInMilliseconds: Math.trunc(game.playTimeInMilliseconds),
|
||||
shop: game.shop,
|
||||
lastTimePlayed: game.lastTimePlayed,
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@ export const updateGamePlaytime = async (
|
|||
lastTimePlayed: Date
|
||||
) => {
|
||||
return HydraApi.put(`/games/${game.remoteId}`, {
|
||||
playTimeDeltaInSeconds: delta,
|
||||
playTimeDeltaInSeconds: Math.trunc(delta),
|
||||
lastTimePlayed,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ export const uploadBatchGames = async () => {
|
|||
chunk.map((game) => {
|
||||
return {
|
||||
objectId: game.objectID,
|
||||
playTimeInMilliseconds: Math.round(game.playTimeInMilliseconds),
|
||||
playTimeInMilliseconds: Math.trunc(game.playTimeInMilliseconds),
|
||||
shop: game.shop,
|
||||
lastTimePlayed: game.lastTimePlayed,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue