Stuggling a bit to get components to rerender when a prop updates in the Friendship page, will sort out tomorrow
This commit is contained in:
@@ -12,12 +12,14 @@ export class FriendshipController {
|
||||
@Get('myfriends')
|
||||
@UseGuards(AuthenticateGuard)
|
||||
@UseGuards(TwoFactorGuard)
|
||||
findEmpty(@Req() req) {
|
||||
findEmpty(@Query('username') username: string, @Req() req) {
|
||||
const user = req.user;
|
||||
if (username === undefined) {
|
||||
console.log("WHAT IS UP MY GUYS IT IS YOUR BOI THAT IDIOT YOU HATE 11111");
|
||||
return this.friendshipService.findAllFriends(user.id);
|
||||
} else {
|
||||
|
||||
console.log("WHAT IS UP MY GUYS IT IS YOUR BOI THAT IDIOT YOU HATE 11111");
|
||||
|
||||
return this.friendshipService.findAllFriends(user.id);
|
||||
}
|
||||
}
|
||||
|
||||
// GET http://transcendance:8080/api/v2/network/myfriends/relationshipId
|
||||
|
||||
@@ -23,6 +23,13 @@ export class FriendshipService {
|
||||
return friendship;
|
||||
}
|
||||
|
||||
// async findOneFriendByUsername(friendUsername: string, username: string) {
|
||||
// const friendship = await this.friendshipRepository.find({ where: { friendUsername: +friendshipId, requesterUsername: username, status: FriendshipStatus.ACCEPTED } });
|
||||
// if (!friendship)
|
||||
// throw new HttpException(`The requested friend not found.`, HttpStatus.NOT_FOUND);
|
||||
// return friendship;
|
||||
// }
|
||||
|
||||
async findOneBlocked(friendshipId: string) {
|
||||
const friendship = await this.friendshipRepository.find({ where: { id: +friendshipId, status: FriendshipStatus.BLOCKED } });
|
||||
if (!friendship)
|
||||
|
||||
Reference in New Issue
Block a user