diff options
Diffstat (limited to 'api/user')
| -rw-r--r-- | api/user/avatar.py | 2 | ||||
| -rw-r--r-- | api/user/info.py | 4 | ||||
| -rw-r--r-- | api/user/password.py | 2 | 
3 files changed, 4 insertions, 4 deletions
diff --git a/api/user/avatar.py b/api/user/avatar.py index f55db4a..bfbc097 100644 --- a/api/user/avatar.py +++ b/api/user/avatar.py @@ -31,7 +31,7 @@ def update_avatar(user_id):  	if not request.data: return "", 400  	open(f"database/avatars/{user_id}.png", "wb") \ -     .write(decode(request.data, "base64")) +        .write(decode(request.data, "base64"))  	return "", 200 diff --git a/api/user/info.py b/api/user/info.py index 3711371..a5e2aac 100644 --- a/api/user/info.py +++ b/api/user/info.py @@ -8,8 +8,8 @@ import json  # get relation to user_2_id from user_1_id's perspective  def get_relation_to(user_1_id, user_2_id):  	relation = cursor.execute("select * from social where " + \ -               "(user_1_id = ? and user_2_id = ?) or " + \ -               "(user_1_id = ? and user_2_id = ?)", [user_1_id, user_2_id, user_2_id, user_1_id]).fetchone() +                  "(user_1_id = ? and user_2_id = ?) or " + \ +                  "(user_1_id = ? and user_2_id = ?)", [user_1_id, user_2_id, user_2_id, user_1_id]).fetchone()  	if not relation: return "none"  	if relation[2] == "friendship": return "friends"  	if relation[2] == "outgoing" and relation[0] == user_1_id: diff --git a/api/user/password.py b/api/user/password.py index b77067f..51ab6db 100644 --- a/api/user/password.py +++ b/api/user/password.py @@ -10,7 +10,7 @@ def index():  	data = request.get_json()  	if not data["password"] or \ -                                  not data["newPassword"]: +                                     not data["newPassword"]:  		return "", 400  	return {}, 200  |