little cleanup of the last commit
+ CSS adjustements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user