diff --git a/src/main/events/library/sync-game-by-object-id.ts b/src/main/events/library/sync-game-by-object-id.ts index 0630ceb9..02071696 100644 --- a/src/main/events/library/sync-game-by-object-id.ts +++ b/src/main/events/library/sync-game-by-object-id.ts @@ -11,12 +11,12 @@ const syncGameByObjectId = async ( return HydraApi.get( `/profile/games/${shop}/${objectId}` ).then(async (res) => { + const { id, playTimeInSeconds, ...rest } = res; + const gameKey = levelKeys.game(shop, objectId); const game = await gamesSublevel.get(gameKey); - const { id, playTimeInSeconds, ...rest } = res; - - gamesSublevel.put(gameKey, { + await gamesSublevel.put(gameKey, { ...game, ...rest, remoteId: id,