Paiement automatique d'une course

This commit is contained in:
2024-12-08 19:27:40 +01:00
parent 481400d404
commit 8681752888
3 changed files with 18 additions and 15 deletions

View File

@ -27,7 +27,7 @@ export class GameService {
})
}
}
const runnerId = alreadyStarted ? game.currentRunnerId : players[Math.trunc(players.length * Math.random())].id
const runnerId = alreadyStarted ? game.currentRunnerId : players[Math.floor(players.length * Math.random())].id
return await this.prisma.game.update({
where: { id: 1 },
data: {