mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 17:53:55 +00:00
fix: refactor and fix types
This commit is contained in:
@@ -14,9 +14,13 @@ const syncGameByObjectId = async (
|
||||
const gameKey = levelKeys.game(shop, objectId);
|
||||
const game = await gamesSublevel.get(gameKey);
|
||||
|
||||
const { id, playTimeInSeconds, ...rest } = res;
|
||||
|
||||
gamesSublevel.put(gameKey, {
|
||||
...(game ?? { remoteId: null }),
|
||||
...res,
|
||||
...game,
|
||||
...rest,
|
||||
remoteId: id,
|
||||
playTimeInMilliseconds: playTimeInSeconds * 1000,
|
||||
});
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user