Skip to content
Snippets Groups Projects
Commit 903e1f20 authored by L4168's avatar L4168
Browse files

fix join-faction bug

parent f6b9bbe9
No related branches found
No related tags found
2 merge requests!59Development to master,!36Development
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment