feat: refactor hydra api

This commit is contained in:
Zamitto 2024-07-10 21:35:39 -03:00
parent a81b016500
commit 6f70b529a2
9 changed files with 27 additions and 43 deletions

View file

@ -10,11 +10,7 @@ export const createGame = async (game: Game) => {
lastTimePlayed: game.lastTimePlayed,
})
.then((response) => {
const {
id: remoteId,
playTimeInMilliseconds,
lastTimePlayed,
} = response.data;
const { id: remoteId, playTimeInMilliseconds, lastTimePlayed } = response;
gameRepository.update(
{ objectID: game.objectID },