aboutsummaryrefslogtreecommitdiff
path: root/api/social/destroy_relation.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-16 16:57:26 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-16 16:57:26 +0200
commit07c2b124e4348b15f1e5ec18c6cdfd77248c6bc8 (patch)
treee4a29123d3ebedc1d25500390c904c66b3b02489 /api/social/destroy_relation.py
parentaa2c999702dadba2afbcf2be9f597f890aafcc87 (diff)
spaces > tabs in python :(
Diffstat (limited to 'api/social/destroy_relation.py')
-rw-r--r--api/social/destroy_relation.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/api/social/destroy_relation.py b/api/social/destroy_relation.py
index 2aa793b..d2e4388 100644
--- a/api/social/destroy_relation.py
+++ b/api/social/destroy_relation.py
@@ -12,16 +12,16 @@ remove = Blueprint('remove', __name__)
@remove.route('/remove', methods=['POST'])
@two_person
def index(user_1_id, user_2_id):
- relation = get_relation_to(user_1_id, user_2_id)
- if relation == "none": return "", 403
+ relation = get_relation_to(user_1_id, user_2_id)
+ if relation == "none": return "", 403
- remove_relation(user_1_id, user_2_id)
- remove_relation(user_2_id, user_1_id)
+ remove_relation(user_1_id, user_2_id)
+ remove_relation(user_2_id, user_1_id)
- io.emit("changedRelation", {"id": user_2_id}, room="user-" + user_1_id)
- io.emit("changedRelation", {"id": user_1_id}, room="user-" + user_2_id)
+ io.emit("changedRelation", {"id": user_2_id}, room="user-" + user_1_id)
+ io.emit("changedRelation", {"id": user_1_id}, room="user-" + user_2_id)
- return "", 200
+ return "", 200
unblock = Blueprint('unblock', __name__)
@@ -30,10 +30,10 @@ unblock = Blueprint('unblock', __name__)
@unblock.route('/unblock', methods=['POST'])
@two_person
def index(user_1_id, user_2_id):
- if get_relation_to(user_1_id, user_2_id) != "blocked": return "", 403
+ if get_relation_to(user_1_id, user_2_id) != "blocked": return "", 403
- remove_relation(user_1_id, user_2_id)
- return "", 200
+ remove_relation(user_1_id, user_2_id)
+ return "", 200
dynamic_routes = [["/social", remove], ["/social", unblock]]