pendant req
This commit is contained in:
@@ -98,7 +98,7 @@ export class FriendshipController {
|
||||
@UseGuards(TwoFactorGuard)
|
||||
findAllPendantFriendshipRequested(@Req() req) {
|
||||
const user = req.user;
|
||||
return this.friendshipService.findAllPendantRequestsForFriendship(user.id);
|
||||
return this.friendshipService.findAllPendantRequestsForFriendship(user.username);
|
||||
}
|
||||
|
||||
// GET http://transcendance:8080/api/v2/network/received
|
||||
@@ -107,6 +107,6 @@ export class FriendshipController {
|
||||
@UseGuards(TwoFactorGuard)
|
||||
findAllPendantFriendshipReceived(@Req() req) {
|
||||
const user = req.user;
|
||||
return this.friendshipService.findAllReceivedRequestsForFriendship(user.id);
|
||||
return this.friendshipService.findAllReceivedRequestsForFriendship(user.username);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,8 +64,10 @@ export class FriendshipService {
|
||||
.getMany();
|
||||
let partialFriendship : Partial<Friendship>[] = [];
|
||||
for (const friend of friendship) {
|
||||
console.log("FRIENDSHIP : " + friend);
|
||||
partialFriendship.push({id: friend.id, senderUsername: friend.senderUsername, receiverUsername: friend.receiverUsername, status: friend.status});
|
||||
}
|
||||
console.log("Pendant requests : " + partialFriendship);
|
||||
return partialFriendship;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user