mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 08:43:57 +00:00
missing parse to int in put /games/:gameId
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user