feat: add await to update level game

This commit is contained in:
Zamitto
2025-05-26 11:50:08 -03:00
parent d2b3508b5b
commit 0225e31947

View File

@@ -11,12 +11,12 @@ const syncGameByObjectId = async (
return HydraApi.get<UserGameDetails>(
`/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,