little cleanup of the last commit

+ CSS adjustements
This commit is contained in:
LuckyLaszlo
2023-01-18 02:52:52 +01:00
parent d44576513e
commit b66a0f78c3
9 changed files with 64 additions and 28 deletions

View File

@@ -26,8 +26,9 @@ export class GameController {
@UseGuards(TwoFactorGuard)
async getMatchHistory(@Req() req, @Query('username') username: string, @Res() res)
{
console.log("DANS MATCH HISTORY")
console.log("usrrnmae" + username)
if (!username) {
username = req.user.username;
}
return this.gameService.getMatchHistory(username, res);
}

View File

@@ -62,12 +62,9 @@ export class GameService {
.where('history.playerOne.id = :userOne', {userOne : user.id})
.orWhere('history.playerTwo.id = :userTwo', {userTwo: user.id})
.getMany()
console.log("gZZZZZZZZZZZZamehistory")
console.log(...gameHistory)
let sendableHistory : SendableMatchHistory[] = []
for (const history of gameHistory)
{
console.log(history.playerOne.username + 'ssssssssss')
sendableHistory.push(new SendableMatchHistory(history))
}
console.log("sendable history")

View File

@@ -16,6 +16,6 @@ export class SendableMatchHistory {
this.playerOneUsername = matchHistory.playerOne.username;
this.playerTwoUsername = matchHistory.playerTwo.username;
this.playerOneResult = matchHistory.playerOneResult;
this.playerTwoResult = matchHistory.playerTwoResult;
this.playerTwoResult = matchHistory.playerTwoResult;
};
}