From bd7919e7fca14717fd153e6150f844de94db2beb Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 10 Mar 2021 12:46:13 +0100 Subject: user/info fix with status --- api/user/info.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'api/user/info.py') diff --git a/api/user/info.py b/api/user/info.py index 954a989..6dc48f1 100644 --- a/api/user/info.py +++ b/api/user/info.py @@ -4,14 +4,21 @@ from auth.login_token import token_login import json def format_user(user_id): - user = cursor.execute("select username, user_id, country, type, registered, avatar from users where user_id = ?", [user_id]).fetchone() + user = cursor.execute("select " + ", ".join([ + "username", + "user_id", + "country", + "registered", + "avatar", + "status", + ]) + " from users where user_id = ?", [user_id]).fetchone() return { "username": user[0], "id": user[1], "country": user[2], - "type": user[3], - "registered": user[4], - "avatar": user[5], + "registered": user[3], + "avatar": user[4], + "status": user[5], } info = Blueprint('info', __name__) -- cgit v1.2.3