correction d'un appel non protégé
This commit is contained in:
@@ -372,11 +372,14 @@ export class ChatService {
|
|||||||
async getListBlockUser(username: string): Promise<string[]>
|
async getListBlockUser(username: string): Promise<string[]>
|
||||||
{
|
{
|
||||||
printCaller("-- in ");
|
printCaller("-- in ");
|
||||||
|
let users: string[] = [];
|
||||||
let user = await this.getUserByName(username);
|
let user = await this.getUserByName(username);
|
||||||
let friends_users = await this.friendshipService.findAllBlockedFriends(user.id);
|
console.log("USERNAME CHAT SRVICE " + username);
|
||||||
let users = friends_users.map(user => user.receiverUsername);
|
let friends_users;
|
||||||
|
if (user)
|
||||||
|
friends_users = await this.friendshipService.findAllBlockedFriends(user.id);
|
||||||
|
if (friends_users)
|
||||||
|
users = friends_users.map(user => user.receiverUsername);
|
||||||
printCaller("-- out ");
|
printCaller("-- out ");
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user