From 0225e31947a2ccd8f0d6412965e3883aa422e6a5 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Mon, 26 May 2025 11:50:08 -0300 Subject: [PATCH] feat: add await to update level game --- src/main/events/library/sync-game-by-object-id.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,