a few small fixes
This commit is contained in:
@@ -310,7 +310,7 @@ export class FriendshipService {
|
|||||||
if (relation.receiver && relation.receiver.id === user.id) {
|
if (relation.receiver && relation.receiver.id === user.id) {
|
||||||
// console.log('friendship.service blockFriendship trying to delete and recreate a friendship with block')
|
// console.log('friendship.service blockFriendship trying to delete and recreate a friendship with block')
|
||||||
// console.log({...relation})
|
// 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);
|
await this.removeFriendship(relationshipId, user);
|
||||||
return await this.create(newFriendshipDto, user);
|
return await this.create(newFriendshipDto, user);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,6 +21,12 @@
|
|||||||
console.log({...user})
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user