diff options
| author | lonkaars <l.leblansch@gmail.com> | 2021-03-13 14:07:19 +0100 | 
|---|---|---|
| committer | lonkaars <l.leblansch@gmail.com> | 2021-03-13 14:07:19 +0100 | 
| commit | 5484abefebb0464158e872be7bbf44a2b1ac3aed (patch) | |
| tree | 2194b4120d15dc2ab7ba151d26435348da4987cd | |
| parent | 5d02095526c95676ad3f5a6d6763f247bf9e6951 (diff) | |
remove request/friend works now
| -rw-r--r-- | api/social/destroy_relation.py | 1 | ||||
| -rw-r--r-- | components/notificationsArea.tsx | 4 | 
2 files changed, 3 insertions, 2 deletions
diff --git a/api/social/destroy_relation.py b/api/social/destroy_relation.py index 1107024..aac6360 100644 --- a/api/social/destroy_relation.py +++ b/api/social/destroy_relation.py @@ -25,6 +25,7 @@ def index():      if relation == "none": return 403      remove_relation(user_1_id, user_2_id) +    remove_relation(user_2_id, user_1_id)      return "", 200  dynamic_route = ["/social", remove] diff --git a/components/notificationsArea.tsx b/components/notificationsArea.tsx index ab29f9c..86b90b7 100644 --- a/components/notificationsArea.tsx +++ b/components/notificationsArea.tsx @@ -89,7 +89,7 @@ function FriendRequest(props: {  	return !gone && <Acceptable onAccept={() => {  		axios.request({  			method: "post", -			url: `/api/social/accept`, +			url: "/api/social/accept",  			headers: {"content-type": "application/json"},  			data: { "id": props.user?.id }  		}) @@ -97,7 +97,7 @@ function FriendRequest(props: {  	}} onDeny={() => {  		axios.request({  			method: "post", -			url: `/api/social/remove`, +			url: "/api/social/remove",  			headers: {"content-type": "application/json"},  			data: { "id": props.user?.id }  		})  |