fixed merge conflicts

This commit is contained in:
2025-09-26 17:01:45 +02:00
parent 8f6634b03f
commit 8980d98394
14 changed files with 3 additions and 588 deletions
@@ -151,7 +151,6 @@ export class JoinGameCommandHandler {
isOnline: true
};
<<<<<<< HEAD
// Check if player name is already in use by a different player
const existingPlayerWithName = gameData.currentPlayers.find(
p => p.playerName === command.playerName && p.playerId !== command.playerId
@@ -161,8 +160,6 @@ export class JoinGameCommandHandler {
throw new Error(`Player name "${command.playerName}" is already in use in this game`);
}
=======
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
// Update players list (remove if exists, then add)
gameData.currentPlayers = gameData.currentPlayers.filter(p => p.playerId !== command.playerId);
gameData.currentPlayers.push(newPlayer);
@@ -173,12 +170,6 @@ export class JoinGameCommandHandler {
// Store updated data in Redis with TTL (24 hours)
await this.redisService.setWithExpiry(redisKey, JSON.stringify(gameData), 24 * 60 * 60);
<<<<<<< HEAD
=======
// Add player to active players set
await this.redisService.setAdd(`active_players:${game.id}`, command.playerId);
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
logOther('Game data updated in Redis', {
gameId: game.id,
gameCode: game.gamecode,
@@ -219,10 +210,6 @@ export class JoinGameCommandHandler {
gameData.currentPlayers = gameData.currentPlayers.filter(p => p.playerId !== playerId);
await this.redisService.setWithExpiry(redisKey, JSON.stringify(gameData), 24 * 60 * 60);
<<<<<<< HEAD
=======
await this.redisService.setRemove(`active_players:${gameId}`, playerId);
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
}
} catch (error) {
logError('Failed to remove player from Redis', error instanceof Error ? error : new Error(String(error)));