diff --git a/src/faction/faction.service.ts b/src/faction/faction.service.ts index e6bec65d77e45e500aad4c49f1e5f7a6168e53c4..014188e458bf5231f8e539239a2a4914273ed4e4 100644 --- a/src/faction/faction.service.ts +++ b/src/faction/faction.service.ts @@ -35,7 +35,12 @@ export class FactionService { person: person, }); //check if user is already in a faction - if (await this.game_PersonRepository.findOne(gameperson)) { + if ( + await this.game_PersonRepository.findOne({ + person: person, + game: faction.game, + }) + ) { throw new HttpException( 'You have already joined faction!', HttpStatus.BAD_REQUEST,