mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 22:06:17 +00:00
fix sending delta in millis to api
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user