Merge branch 'master' of bitbucket.org:LuckyLaszlo/ft_transcendence
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user