diff --git a/srcs/requirements/nestjs/api_back/src/friendship/friendship.controller.ts b/srcs/requirements/nestjs/api_back/src/friendship/friendship.controller.ts index e45e11f6..4c6417ea 100644 --- a/srcs/requirements/nestjs/api_back/src/friendship/friendship.controller.ts +++ b/srcs/requirements/nestjs/api_back/src/friendship/friendship.controller.ts @@ -22,18 +22,20 @@ export class FriendshipController { // GET http://transcendance:8080/api/v2/network/myfriends/relationshipId - @Get('myfriend/:relationshipId') - @UseGuards(AuthenticateGuard) - @UseGuards(TwoFactorGuard) - findOneFriend(@Param('relationshipId') relationshipId: string, @Req() req) { - const user = req.user; - return this.friendshipService.findOneFriend(relationshipId, user.username); - } + // @Get('myfriend/:relationshipId') + // @UseGuards(AuthenticateGuard) + // @UseGuards(TwoFactorGuard) + // findOneFriend(@Param('relationshipId') relationshipId: string, @Req() req) { + // console.log("Username " + relationshipId); + // const user = req.user; + // return this.friendshipService.findOneFriend(relationshipId, user.username); + // } - @Get('myfriends/:friendUsername') + @Get('myfriend/:friendUsername') @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) findOneRelationByUsername(@Param('friendUsername') friendUsername : string, @Req() req) { + console.log("Username " + friendUsername); const user = req.user; return this.friendshipService.findOneFriendByUsername(friendUsername, user.username); }