Deleted logs, comments. Fixed change-game-playtime event.

This commit is contained in:
Moyasee
2025-09-17 12:14:51 +03:00
parent 86da92aa3f
commit 665365abdc
2 changed files with 3 additions and 14 deletions

View File

@@ -11,12 +11,12 @@ const changeGamePlaytime = async (
playTimeInSeconds: number
) => {
try {
await HydraApi.put(`/profile/games/${shop}/${objectId}/playtime`, {
playTimeInSeconds,
});
const gameKey = levelKeys.game(shop, objectId);
const game = await gamesSublevel.get(gameKey);
if (!game) return;
await HydraApi.put(`/profile/games/${shop}/${objectId}/playtime`, {
playTimeInSeconds,
});
await gamesSublevel.put(gameKey, {
...game,
playTimeInMilliseconds: playTimeInSeconds * 1000,