From e9bda2dbde2b27054927092e303f9c9c6db6ce26 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalyoncu Date: Sat, 14 Oct 2023 10:27:32 +0200 Subject: [PATCH] fixed: disconnect games counted twice for the achievements --- nestjs/conf/src/match/service/match.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nestjs/conf/src/match/service/match.service.ts b/nestjs/conf/src/match/service/match.service.ts index ee5dbf1..d21e4d3 100644 --- a/nestjs/conf/src/match/service/match.service.ts +++ b/nestjs/conf/src/match/service/match.service.ts @@ -279,6 +279,7 @@ export class MatchService { } async finishMatch(room: Room): Promise { + const { state, flawlessVictory } = this.determineMatchState(room); const match = await this.prisma.match.findUnique({ where: { id: room.id, @@ -295,8 +296,6 @@ export class MatchService { return null; } - const { state, flawlessVictory } = this.determineMatchState(room); - const updatedMatch = await this.prisma.match.update({ where: { id: room.id,