Merge branch 'master' of bitbucket.org:LuckyLaszlo/ft_transcendence

This commit is contained in:
simplonco
2023-01-16 14:10:54 +01:00
2 changed files with 7 additions and 1 deletions

View File

@@ -310,7 +310,7 @@ export class FriendshipService {
if (relation.receiver && relation.receiver.id === user.id) {
// console.log('friendship.service blockFriendship trying to delete and recreate a friendship with block')
// console.log({...relation})
const newFriendshipDto = {"receiverUsername": relation.sender.username, "receiverId": relation.sender.id, "status": FriendshipStatus.BLOCKED};
const newFriendshipDto = {"receiverUsername": relation.sender.username, "status": FriendshipStatus.BLOCKED};
await this.removeFriendship(relationshipId, user);
return await this.create(newFriendshipDto, user);
} else {

View File

@@ -21,6 +21,12 @@
console.log({...user})
})
export const updateUser = async() => {
user = await fetch(`http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/user?username=${params.username}`)
.then( (x) => x.json() );
};
$: params.username, updateUser();
</script>