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

updated faction verify service

parent 94bf1872
No related branches found
No related tags found
3 merge requests!59Development to master,!44Development to testing,!41Draw update
...@@ -134,12 +134,16 @@ export class FactionService { ...@@ -134,12 +134,16 @@ export class FactionService {
where: { person, game }, where: { person, game },
relations: ['faction'], relations: ['faction'],
}); });
if (gameperson) { if (gameperson.faction) {
return { return {
factionId: gameperson.faction.factionId, factionId: gameperson.faction.factionId,
factionName: gameperson.faction.factionName,
}; };
} else { } else {
throw new HttpException('No faction was found', HttpStatus.BAD_REQUEST); throw new HttpException(
gameperson ? 'You are admin for this game!' : 'No faction was found',
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