From e78416efd01f6005e9ea00409b52d6d5b3c6e836 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 21 Jun 2023 21:07:16 +0200 Subject: [PATCH] api fix --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 9be2943..39f391c 100644 --- a/main.py +++ b/main.py @@ -265,7 +265,7 @@ def get_id(): message = tag_id finished = queue_item c.execute(f"SELECT * FROM users WHERE id={user}") - username = c.fetchall() + username = c.fetchall()[0] conn.commit() return make_response(json.dumps({"mode":"2","username":username,"code":"1"})) elif state == "remove": @@ -276,7 +276,7 @@ def get_id(): message = tag_id finished = queue_item c.execute(f"SELECT * FROM users WHERE id={user}") - username = c.fetchall() + username = c.fetchall()[0] conn.commit() return make_response(json({"mode":"2","username":username,"code":"2"})) else: