Correction détection si on est sur la première course

This commit is contained in:
Emmy D'Anello 2024-12-11 22:34:15 +01:00
parent 49c320b2db
commit af14cfb11d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -76,7 +76,7 @@ export class GameService {
}) })
const newRunnerId = game.currentRun.runnerId == 1 ? 2 : 1 const newRunnerId = game.currentRun.runnerId == 1 ? 2 : 1
const firstRun = await this.prisma.playerRun.findFirst({ where: { runnerId: newRunnerId } }) !== null const firstRun = await this.prisma.playerRun.findFirst({ where: { runnerId: newRunnerId } }) === null
const newRun = await this.prisma.playerRun.create({ const newRun = await this.prisma.playerRun.create({
data: { data: {
gameId: game.id, gameId: game.id,