From b7b9b3d64549c21cdf07cc6fb437f06045fb3942 Mon Sep 17 00:00:00 2001 From: Me Date: Sun, 25 Dec 2022 05:53:29 +0100 Subject: [PATCH] ok changing everything again, decided to simplify the Friendship.entity, so i made a class that returns the stuff we need from a Friendship --- .../friendship/dto/create-friendship.dto.ts | 6 +- .../friendship/entities/friendship.entity.ts | 16 +- .../src/friendship/friendship.controller.ts | 22 +- .../src/friendship/friendship.service.ts | 203 ++++++++++++------ .../src/friendship/sendableFriendship.ts | 28 +++ .../api_back/src/users/users.controller.ts | 17 +- .../api_back/src/users/users.service.ts | 5 +- .../src/pages/profile/ProfileDisplay.svelte | 4 +- .../src/pages/profile/ProfileFriends.svelte | 69 +++--- .../api_front/src/pieces/DisplayAUser.svelte | 18 +- 10 files changed, 251 insertions(+), 137 deletions(-) create mode 100644 srcs/requirements/nestjs/api_back/src/friendship/sendableFriendship.ts diff --git a/srcs/requirements/nestjs/api_back/src/friendship/dto/create-friendship.dto.ts b/srcs/requirements/nestjs/api_back/src/friendship/dto/create-friendship.dto.ts index a59e195f..e789f09b 100644 --- a/srcs/requirements/nestjs/api_back/src/friendship/dto/create-friendship.dto.ts +++ b/srcs/requirements/nestjs/api_back/src/friendship/dto/create-friendship.dto.ts @@ -5,9 +5,9 @@ export class CreateFriendshipDto { @IsPositive() // @Max(1000) ? readonly receiverId: number; - @IsNotEmpty() - @IsString() - readonly receiverUsername: string; + // @IsNotEmpty() + // @IsString() + // readonly receiverUsername: string; @IsEnum(FriendshipStatus) readonly status: FriendshipStatus; } diff --git a/srcs/requirements/nestjs/api_back/src/friendship/entities/friendship.entity.ts b/srcs/requirements/nestjs/api_back/src/friendship/entities/friendship.entity.ts index 7ef8f238..29538e0a 100644 --- a/srcs/requirements/nestjs/api_back/src/friendship/entities/friendship.entity.ts +++ b/srcs/requirements/nestjs/api_back/src/friendship/entities/friendship.entity.ts @@ -27,15 +27,15 @@ export class Friendship { // ok so the username is still here because i think it might be useful for the frontend to have access to it, but really all i need is the ID's // since i have the ID's do i even need the User ? - @Column() - senderUsername : string; - @Column() - senderId : number; + // @Column() + // senderUsername : string; + // @Column() + // senderId : number; - @Column() - receiverUsername : string; - @Column() - receiverId : number; + // @Column() + // receiverUsername : string; + // @Column() + // receiverId : number; @Column({ type: 'enum', enum: FriendshipStatus, default: FriendshipStatus.REQUESTED}) status: FriendshipStatus; 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 4573b9e7..c8925519 100644 --- a/srcs/requirements/nestjs/api_back/src/friendship/friendship.controller.ts +++ b/srcs/requirements/nestjs/api_back/src/friendship/friendship.controller.ts @@ -21,8 +21,8 @@ export class FriendshipController { // @Query('username') username: string, // new and improved finder of people - // GET http://transcendance:8080/api/v2/network/:friendUsername - @Get('findfriends') + // GET http://transcendance:8080/api/v2/network/myfriends + @Get('myfriends') @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) findOne(@Query('username') otherUsername: string, @Query('id') id: number, @Req() req) { @@ -52,8 +52,8 @@ export class FriendshipController { - // POST http://transcendance:8080/api/v2/network/myfriends - @Post('myfriends') + // POST http://transcendance:8080/api/v2/network/relations + @Post('relations') @HttpCode(HttpStatus.CREATED) @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @@ -64,8 +64,8 @@ export class FriendshipController { return new HttpException('You can\'t request a frienship to yourself', HttpStatus.BAD_REQUEST); } - // PATCH http://transcendance:8080/api/v2/network/myfriends/relationshipId/accept - @Patch('myfriends/:relationshipId/accept') + // PATCH http://transcendance:8080/api/v2/network/relations/:relationshipId/accept + @Patch('relations/:relationshipId/accept') @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) updateAccept(@Param('relationshipId') relationshipId: number, @Req() req) { @@ -73,7 +73,8 @@ export class FriendshipController { return this.friendshipService.acceptFriendship(relationshipId, user); } - @Patch('myfriends/:relationshipId/decline') + // PATCH http://transcendance:8080/api/v2/network/relations/:relationshipId/decline + @Patch('relations/:relationshipId/decline') @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) updateDecline(@Param('relationshipId') relationshipId: number, @Req() req) { @@ -81,7 +82,8 @@ export class FriendshipController { return this.friendshipService.declineFriendship(relationshipId, user); } - @Patch('myfriends/:relationshipId/block') + // PATCH http://transcendance:8080/api/v2/network/relations/:relationshipId/block + @Patch('relations/:relationshipId/block') @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) updateBlock(@Param('relationshipId') relationshipId: number, @Req() req) { @@ -89,8 +91,8 @@ export class FriendshipController { return this.friendshipService.blockFriendship(relationshipId, user); } - // DELETE http://transcendance:8080/api/v2/network/myfriends/relationshipId - @Delete('myfriends/:relationshipId') + // DELETE http://transcendance:8080/api/v2/network/relations/:relationshipId + @Delete('relations/:relationshipId') @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) remove(@Param('relationshipId') relationshipId: number, @Req() req) { diff --git a/srcs/requirements/nestjs/api_back/src/friendship/friendship.service.ts b/srcs/requirements/nestjs/api_back/src/friendship/friendship.service.ts index f80a318f..2de9fa9f 100644 --- a/srcs/requirements/nestjs/api_back/src/friendship/friendship.service.ts +++ b/srcs/requirements/nestjs/api_back/src/friendship/friendship.service.ts @@ -4,6 +4,7 @@ import { User } from 'src/users/entities/user.entity'; import { Repository, Brackets } from 'typeorm'; import { CreateFriendshipDto } from './dto/create-friendship.dto'; import { Friendship, FriendshipStatus } from './entities/friendship.entity'; +import { SendableFriendship } from './sendableFriendship'; @Injectable() export class FriendshipService { @@ -16,21 +17,36 @@ export class FriendshipService { ) { } + // createSendableFriendship(friendship: Friendship): SendableFriendship { + // let ret = new SendableFriendship; + + // ret.id = friendship.id; + // ret.date = friendship.date + // ret.senderUsername = friendship.sender.username; + // ret.senderId = friendship.sender.id; + // ret.receiverUsername = friendship.receiver.username; + // ret.receiverId = friendship.receiver.id; + // ret.status = friendship.status; + // return ret; + // }; + async findOneRelationshipById(friendId : number, userId : number) { const friendship = await this.friendshipRepository .createQueryBuilder('friendship') + .leftJoinAndSelect('friendship.sender', 'sender') + .leftJoinAndSelect('friendship.receiver', 'receiver') .where( new Brackets((qb) => { qb.where( new Brackets((subAQb) => { - subAQb.where('friendship.senderId = :userId', { userId : userId}) - .andWhere('friendship.receiverId = :friendId', {friendId : friendId}) + subAQb.where('sender.id = :userId', { userId : userId}) + .andWhere('receiver.id = :friendId', {friendId : friendId}) }) ) .orWhere( new Brackets((subBQb) => { - subBQb.where('friendship.senderId = :friendId', {friendId : friendId}) - .andWhere('friendship.receiverId = :userId', {userId : userId}) + subBQb.where('sender.id = :friendId', {friendId : friendId}) + .andWhere('receiver.id = :userId', {userId : userId}) }) ) }), @@ -44,7 +60,9 @@ export class FriendshipService { if (!friendship) { throw new HttpException(`There is no such friendship`, HttpStatus.NOT_FOUND); } - return friendship; + // return friendship; + // return this.createSendableFriendship(friendship); + return new SendableFriendship(friendship); } // basically useless now @@ -79,46 +97,63 @@ export class FriendshipService { if (!friendship) { throw new HttpException(`There is no such friendship`, HttpStatus.NOT_FOUND); } - return friendship; + // return friendship; + return new SendableFriendship(friendship); } + // lets see what happens here, doing directly receiver.id not LeftJoinAndSelect ... async findAllFriends(userId: number) { const friendship = await this.friendshipRepository .createQueryBuilder('friendship') + .leftJoinAndSelect('friendship.sender', 'sender') + .leftJoinAndSelect('friendship.receiver', 'receiver') .where('friendship.status = :status', { status: FriendshipStatus.ACCEPTED }) - .andWhere('friendship.receiverId = :addressee', { addressee: userId }) - .orWhere('friendship.senderId = :requester', { requester: userId }) + .andWhere('receiver.id = :addressee', { addressee: userId }) + .orWhere('sender.id = :requester', { requester: userId }) .andWhere('friendship.status = :status', { status: FriendshipStatus.ACCEPTED }) .getMany(); // for (const friend of friendship) // console.log("FRIENDSHIP : " + friend.status); - return friendship; + // return friendship; + return new SendableFriendship(friendship); } async findOneBlocked(friendshipId: number, userId: number) { - const friendship = await this.friendshipRepository.findOneBy({ id: friendshipId, senderId: userId, status: FriendshipStatus.BLOCKED }); + // const friendship = await this.friendshipRepository.findOneBy({ id: friendshipId, sender.id: userId, status: FriendshipStatus.BLOCKED }); + const friendship = await this.friendshipRepository + .createQueryBuilder('friendship') + .leftJoinAndSelect('friendship.sender', 'sender') + .where('friendship.id = :id', { id: friendshipId }) + .andWhere('sender.id = :requester', { requester: userId }) + .andWhere('friendship.status = :status', { status: FriendshipStatus.BLOCKED }) + .getOne(); if (!friendship) throw new HttpException(`The requested blocked not found.`, HttpStatus.NOT_FOUND); - return friendship; + // return friendship; + return new SendableFriendship(friendship); } async findOneBlockedByUsername(blockedUsername : string, userId : number) { const friendship = await this.friendshipRepository .createQueryBuilder('friendship') - .where('friendship.senderId = :senderId', {senderId : userId}) - .andWhere('friendship.receiverUsername = :friendUsername', {friendUsername : blockedUsername}) + .leftJoinAndSelect('friendship.sender', 'sender') + .leftJoinAndSelect('friendship.receiver', 'receiver') + .where('sender.id = :senderId', {senderId : userId}) + .andWhere('receiver.username = :friendUsername', {friendUsername : blockedUsername}) .andWhere('friendship.status = :status ', {status : FriendshipStatus.BLOCKED}) .getOne() if (!friendship) { throw new HttpException(`The requested blocked not found.`, HttpStatus.NOT_FOUND); } - return friendship; + // return friendship; + return new SendableFriendship(friendship); } async findAllBlockedFriends(userId: number) { const friendships : Friendship[] = await this.friendshipRepository .createQueryBuilder('friendship') - .where('friendship.senderId = :requestee', { requestee: userId }) + .leftJoinAndSelect('friendship.sender', 'sender') + .where('sender.id = :requestee', { requestee: userId }) .andWhere('friendship.status = :status', { status: FriendshipStatus.BLOCKED }) .getMany(); // let partialFriendship : Partial[] = []; @@ -130,13 +165,20 @@ export class FriendshipService { console.log('friendship.service findAllBlockedFriends, partial friendship:') // console.log({...partialFriendship}) // return partialFriendship; - return friendships; + // return friendships; + let sendFrienships: SendableFriendship[] = [] + for (const friendship of friendships) { + sendFrienships.push(new SendableFriendship(friendship)); + } + // return new SendableFriendship(friendship); + return sendFrienships; } async findAllPendantRequestsForFriendship(userId: number) { const friendships = await this.friendshipRepository .createQueryBuilder('friendship') - .where('friendship.senderId = :requestee', { requestee: userId }) + .leftJoinAndSelect('friendship.sender', 'sender') + .where('sender.id = :requestee', { requestee: userId }) .andWhere('friendship.status = :status', { status: FriendshipStatus.REQUESTED }) .getMany(); // let partialFriendship : Partial[] = []; @@ -148,13 +190,19 @@ export class FriendshipService { // return partialFriendship; console.log('friendships services pendant friendships:') console.log({...friendships}) - return friendships; + // return friendships; + let sendFrienships: SendableFriendship[] = [] + for (const friendship of friendships) { + sendFrienships.push(new SendableFriendship(friendship)); + } + return sendFrienships; } async findAllReceivedRequestsForFriendship(userId: number) { const friendships = await this.friendshipRepository .createQueryBuilder('friendship') - .where('friendship.receiverId = :addressee', { addressee: userId }) + .leftJoinAndSelect('friendship.receiver', 'receiver') + .where('receiver.id = :addressee', { addressee: userId }) .andWhere('friendship.status = :status', { status: FriendshipStatus.REQUESTED }) .getMany(); // let partialFriendship : Partial[] = []; @@ -164,10 +212,17 @@ export class FriendshipService { // return partialFriendship; console.log('friendship service received requests') console.log({...friendships}) - return friendships; + // return friendships; + let sendFrienships: SendableFriendship[] = [] + for (const friendship of friendships) { + sendFrienships.push(new SendableFriendship(friendship)); + } + return sendFrienships; } - async create(createFriendshipDto: CreateFriendshipDto, creator : User) : Promise > { + // this is no longer the right return + // async create(createFriendshipDto: CreateFriendshipDto, creator : User) : Promise > { + async create(createFriendshipDto: CreateFriendshipDto, creator : User) { console.log("DTO : \n") console.log({...createFriendshipDto}) const receiver = await this.userRepository.findOneBy({id: createFriendshipDto.receiverId}); @@ -193,25 +248,28 @@ export class FriendshipService { } const newFriendship = new Friendship(); newFriendship.sender = creator; - newFriendship.senderUsername = creator.username; - newFriendship.senderId = creator.id; + // newFriendship.senderUsername = creator.username; + // newFriendship.senderId = creator.id; newFriendship.receiver = receiver; - newFriendship.receiverUsername = receiver.username; - newFriendship.receiverId = receiver.id; + // newFriendship.receiverUsername = receiver.username; + // newFriendship.receiverId = receiver.id; newFriendship.status = createFriendshipDto.status; - const savedFriendship = this.friendshipRepository.save(newFriendship); - const partialFriendship : Partial = { - id : (await savedFriendship).id, - date : (await savedFriendship).date, - receiverUsername: (await savedFriendship).receiverUsername, - receiverId: (await savedFriendship).receiverId, - status : (await savedFriendship).status - } - console.log('friendship.service create friendship, partial friendship') - console.log({...partialFriendship}) + const savedFriendship = await this.friendshipRepository.save(newFriendship); + // const partialFriendship : Partial = { + // id : (await savedFriendship).id, + // date : (await savedFriendship).date, + // receiverUsername: (await savedFriendship).receiverUsername, + // receiverId: (await savedFriendship).receiverId, + // status : (await savedFriendship).status + // } + // console.log('friendship.service create friendship, partial friendship') + // console.log({...partialFriendship}) console.log('friendship.service create friendship, NEW friendship') console.log({...newFriendship}) - return partialFriendship; + console.log('friendship.service create friendship, SAVED friendship') + console.log({...savedFriendship}) + // return partialFriendship; + return new SendableFriendship(savedFriendship); } async acceptFriendship(relationshipId: number, user: User) { @@ -224,18 +282,19 @@ export class FriendshipService { throw new HttpException(`You can't accept your own request.`, HttpStatus.NOT_FOUND); } relation.status = FriendshipStatus.ACCEPTED; - const savedFriendship = this.friendshipRepository.save(relation); - const partialFriendship : Partial = { - id : (await savedFriendship).id, - date : (await savedFriendship).date, - receiverUsername: (await savedFriendship).receiverUsername, - receiverId: (await savedFriendship).receiverId, - status : (await savedFriendship).status - } - console.log('.service accept friendship END') - console.log({...partialFriendship}) + const savedFriendship = await this.friendshipRepository.save(relation); + // const partialFriendship : Partial = { + // id : (await savedFriendship).id, + // date : (await savedFriendship).date, + // receiverUsername: (await savedFriendship).receiverUsername, + // receiverId: (await savedFriendship).receiverId, + // status : (await savedFriendship).status + // } + // console.log('.service accept friendship END') + // console.log({...partialFriendship}) - return partialFriendship; + // return partialFriendship; + return new SendableFriendship(savedFriendship); } async declineFriendship(relationshipId: number, user: User) { @@ -246,16 +305,17 @@ export class FriendshipService { throw new HttpException(`You can't decline your own request.`, HttpStatus.NOT_FOUND); } relation.status = FriendshipStatus.DECLINED; - const savedFriendship = this.friendshipRepository.save(relation); - const partialFriendship : Partial = { - id : (await savedFriendship).id, - date : (await savedFriendship).date, - receiverUsername: (await savedFriendship).receiverUsername, - status : (await savedFriendship).status - } - console.log('decline friend request') - console.log({...partialFriendship}) - return partialFriendship + const savedFriendship = await this.friendshipRepository.save(relation); + // const partialFriendship : Partial = { + // id : (await savedFriendship).id, + // date : (await savedFriendship).date, + // receiverUsername: (await savedFriendship).receiverUsername, + // status : (await savedFriendship).status + // } + // console.log('decline friend request') + // console.log({...partialFriendship}) + // return partialFriendship + return new SendableFriendship(savedFriendship); } async blockFriendship(relationshipId: number, user: User) { @@ -283,15 +343,16 @@ export class FriendshipService { return await this.create(newFriendshipDto, user); } else { relation.status = FriendshipStatus.BLOCKED; - const savedFriendship = this.friendshipRepository.save(relation); - const partialFriendship : Partial = { - id : (await savedFriendship).id, - date : (await savedFriendship).date, - receiverUsername: (await savedFriendship).receiverUsername, - receiverId: (await savedFriendship).receiverId, - status : (await savedFriendship).status - } - return partialFriendship + const savedFriendship = await this.friendshipRepository.save(relation); + // const partialFriendship : Partial = { + // id : (await savedFriendship).id, + // date : (await savedFriendship).date, + // receiverUsername: (await savedFriendship).receiverUsername, + // receiverId: (await savedFriendship).receiverId, + // status : (await savedFriendship).status + // } + // return partialFriendship + return new SendableFriendship(savedFriendship); } } @@ -323,18 +384,20 @@ export class FriendshipService { const friendship = await this.friendshipRepository .createQueryBuilder('friendship') + .leftJoinAndSelect('friendship.sender', 'sender') + .leftJoinAndSelect('friendship.receiver', 'receiver') .where( new Brackets((qb) => { qb.where( new Brackets((subAQb) => { - subAQb.where('friendship.senderId = :senderId', { senderId: userConnectedId}) - .andWhere('friendship.receiverId = :receiverId', { receiverId: userToFindId}) + subAQb.where('sender.id = :senderId', { senderId: userConnectedId}) + .andWhere('receiver.id = :receiverId', { receiverId: userToFindId}) }) ) .orWhere( new Brackets((subBQb) => { - subBQb.where('friendship.senderId = :senderId', {senderId : userToFindId}) - .andWhere('friendship.receiverId = :receiverId', {receiverUsername : userConnectedId}) + subBQb.where('sender.id = :senderId', {senderId : userToFindId}) + .andWhere('receiver.id = :receiverId', {receiverUsername : userConnectedId}) }) ) }), diff --git a/srcs/requirements/nestjs/api_back/src/friendship/sendableFriendship.ts b/srcs/requirements/nestjs/api_back/src/friendship/sendableFriendship.ts new file mode 100644 index 00000000..32d58520 --- /dev/null +++ b/srcs/requirements/nestjs/api_back/src/friendship/sendableFriendship.ts @@ -0,0 +1,28 @@ + +import { Friendship, FriendshipStatus } from "./entities/friendship.entity"; + + +// Ok i don't really know what i'm doing but i want a thing that is typeset that i can use to send info back to the Front when they create a friendship or ask for a friendship +// Ok it doesn't seem like i really need an interface, that just enfoces the types + +// export interface SendableFriendship { +export class SendableFriendship { + id: number; + date: Date; + senderUsername: string; + senderId: number; + receiverUsername: string; + receiverId: number; + status: FriendshipStatus; + + // if my constructor is here won't it get sent all over the place too? + constructor(friendship: Friendship) { + this.id = friendship.id; + this.date = friendship.date + this.senderUsername = friendship.sender.username; + this.senderId = friendship.sender.id; + this.receiverUsername = friendship.receiver.username; + this.receiverId = friendship.receiver.id; + this.status = friendship.status; + }; +} \ No newline at end of file diff --git a/srcs/requirements/nestjs/api_back/src/users/users.controller.ts b/srcs/requirements/nestjs/api_back/src/users/users.controller.ts index ee484a20..6ed1b928 100644 --- a/srcs/requirements/nestjs/api_back/src/users/users.controller.ts +++ b/srcs/requirements/nestjs/api_back/src/users/users.controller.ts @@ -19,6 +19,7 @@ export class UsersController { constructor(private readonly usersService: UsersService) {} // par exemple dans postamn ou insomnia http://localhost:3000/users?limit=10&offset=20 + // GET http://transcendance:8080/user/all @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @Get('all') @@ -61,8 +62,16 @@ export class UsersController { @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @Get() - findMe(@Req() req) { - return this.usersService.findOne(req.user.id); + findOne(@Query('id') toFindId: number, @Req() req) { + console.log('users service findOne toFindId:') + console.log(toFindId) + console.log('users service findOne my Id:') + console.log(req.user.id) + if (toFindId === undefined) + return this.usersService.findOne(req.user.id); + else + return this.usersService.findOne(toFindId); + // i would rather just use numbers but i'm guessing Cherif uses this all over } // also seems useless... @@ -75,6 +84,7 @@ export class UsersController { // } + // PATCH http://transcendance:8080/user @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @Patch() @@ -93,6 +103,7 @@ export class UsersController { response.status(200).send("OK") } + // DELETE http://transcendance:8080/user @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @Delete() @@ -100,6 +111,7 @@ export class UsersController { return this.usersService.remove(req.user.id); } + // POST http://transcendance:8080/user/avatar @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @Post('avatar') @@ -109,6 +121,7 @@ export class UsersController { this.usersService.updateAvatar(user.id, file.filename); } + // GET http://transcendance:8080/user/avatar @UseGuards(AuthenticateGuard) @UseGuards(TwoFactorGuard) @Get('avatar') diff --git a/srcs/requirements/nestjs/api_back/src/users/users.service.ts b/srcs/requirements/nestjs/api_back/src/users/users.service.ts index 61e02012..bb3e99be 100644 --- a/srcs/requirements/nestjs/api_back/src/users/users.service.ts +++ b/srcs/requirements/nestjs/api_back/src/users/users.service.ts @@ -32,11 +32,11 @@ export class UsersService { return user; } - async findOne(id: string) { + async findOne(id: number) { console.log(`FIND ONE USER SERVICE Find user ${id}`); const user = await this.userRepository.createQueryBuilder('user') .leftJoinAndSelect('user.stats', 'stats') - .where('user.id = :id', { id: +id }) + .where('user.id = :id', { id: id }) .getOne(); if (!user) throw new NotFoundException(`The requested user not found.`); @@ -53,6 +53,7 @@ export class UsersService { return partialUser; } + // Ok this gets called in the Authenitcation Service, but like i was still able to make a username === someone else's async isUsernameExists(usernameToSearch: string): Promise { const user = await this.userRepository.findOneBy({username : usernameToSearch}); if (!user) diff --git a/srcs/requirements/svelte/api_front/src/pages/profile/ProfileDisplay.svelte b/srcs/requirements/svelte/api_front/src/pages/profile/ProfileDisplay.svelte index 46b7c62b..803f300b 100644 --- a/srcs/requirements/svelte/api_front/src/pages/profile/ProfileDisplay.svelte +++ b/srcs/requirements/svelte/api_front/src/pages/profile/ProfileDisplay.svelte @@ -1,7 +1,7 @@ @@ -45,7 +49,7 @@ {:else}

Sorry

-
Failed to load user {aUsername}
+
Failed to load user {aUserId}
{/if}