fonction de recherche par username
This commit is contained in:
@@ -64,6 +64,7 @@ export class UsersService {
|
|||||||
.leftJoinAndSelect('user.stats', 'stats')
|
.leftJoinAndSelect('user.stats', 'stats')
|
||||||
.where('user.username = :username', { username: username })
|
.where('user.username = :username', { username: username })
|
||||||
.getOne();
|
.getOne();
|
||||||
|
console.log('USERNAME OF FOUND USER : ' + user.username);
|
||||||
if (!user)
|
if (!user)
|
||||||
throw new HttpException(`The user could not be found.`,HttpStatus.NOT_FOUND);
|
throw new HttpException(`The user could not be found.`,HttpStatus.NOT_FOUND);
|
||||||
if (this.friendshipService.findIfUserIsBlockedOrHasBlocked(userConnectedId, user.id.toString()))
|
if (this.friendshipService.findIfUserIsBlockedOrHasBlocked(userConnectedId, user.id.toString()))
|
||||||
|
|||||||
Reference in New Issue
Block a user