fix sending delta in millis to api
Some checks are pending
Lint / lint (push) Waiting to run

This commit is contained in:
Zamitto 2024-06-20 10:38:42 -03:00
parent b60d9aa4db
commit 6b6b472315

View file

@ -3,11 +3,11 @@ import { HydraApi } from "../hydra-api";
export const updateGamePlaytime = async (
game: Game,
delta: number,
deltaInMillis: number,
lastTimePlayed: Date
) => {
return HydraApi.put(`/games/${game.remoteId}`, {
playTimeDeltaInSeconds: Math.trunc(delta),
playTimeDeltaInSeconds: Math.trunc(deltaInMillis / 1000),
lastTimePlayed,
});
};