working on friendships in teh frontend but having to do some debuging in the backend

This commit is contained in:
Me
2022-12-09 05:19:12 +01:00
parent 999b40430d
commit 302ebd674c
7 changed files with 208 additions and 5 deletions

View File

@@ -14,6 +14,9 @@ export class FriendshipController {
@UseGuards(TwoFactorGuard)
findEmpty(@Req() req) {
const user = req.user;
console.log("WHAT IS UP MY GUYS IT IS YOUR BOI THAT IDIOT YOU HATE 11111");
return this.friendshipService.findAllFriends(user.id);
}
@@ -33,7 +36,13 @@ export class FriendshipController {
@UseGuards(TwoFactorGuard)
create(@Body() createFriendshipDto: CreateFriendshipDto, @Req() req) {
const user = req.user;
console.log(`User id: ${user.id}\nFriend id: ${createFriendshipDto.requesterId}\nStatus: ${createFriendshipDto.status}`);
console.log("WHAT IS UP MY GUYS IT IS YOUR BOI THAT IDIOT YOU HATE 22222");
// console.log(`User id: ${user.id}\nFriend id: ${createFriendshipDto.requesterId}\nStatus: ${createFriendshipDto.status}`);
// console.log(`My User id: ${createFriendshipDto.requesterId}`)
console.log(`My User id: ${user.id}`)
console.log(`User id: ${user.id}\nFriend id: ${createFriendshipDto.addresseeId}\nStatus: ${createFriendshipDto.status}`);
if (user.id === +createFriendshipDto.requesterId)
return this.friendshipService.create(createFriendshipDto, user);
return new HttpException('You can\'t request a frienship for another user', HttpStatus.FORBIDDEN);
@@ -73,6 +82,9 @@ export class FriendshipController {
@UseGuards(TwoFactorGuard)
findAllPendantFriendshipRequested(@Req() req) {
const user = req.user;
console.log("WHAT IS UP MY GUYS IT IS YOUR BOI THAT IDIOT YOU HATE Pending 33333");
return this.friendshipService.findAllPendantRequestsForFriendship(user.id);
}