Dope Ranking / status updated

This commit is contained in:
batche
2022-12-22 17:25:44 +01:00
parent 61831da347
commit a0a1239c9d

View File

@@ -58,8 +58,8 @@ export class GameService {
async generateToken(user : User, grantTicketDto : GrantTicketDto)
{
console.log(user.status);
// if (user.status === "In Game" || user.status === "In Pool")
// return new HttpException("You can't play two games", HttpStatus.FORBIDDEN);
if (user.status === "In Game" || user.status === "In Pool")
return new HttpException("You can't play two games", HttpStatus.FORBIDDEN);
if (grantTicketDto.isGameIsWithInvitation === true)
{
const secondUser : Partial<User> = await this.userService.findOneByUsername(user.id.toString(), grantTicketDto.playerTwoUsername)