From e4edf6b6267b45f5e59eddde6d4b75567de824ea Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 14 Jun 2023 20:32:50 +0200 Subject: [PATCH] typo and typu --- main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 23b2b7c..69927ea 100644 --- a/main.py +++ b/main.py @@ -72,7 +72,6 @@ def confirm_remove_user(): @app.route("/removeuser", methods=['GET']) def remove_user(): user_id = request.args.get("id") - #Noch eine Bestätigung nötig c.execute(f"SELECT * FROM users WHERE id={user_id}") user_name = c.fetchall()[0][1] c.execute(f"DELETE FROM tags WHERE userid={user_id}") @@ -172,9 +171,7 @@ def request_removetag(data): join_room(session[id]) if len(users.queue) > 0: queue_item = users.queue[len(users.queue) - 1] - user = queue[0] - print(user) - print(session[id]) + user = queue_item[0] if queue_item == [data["data"], "remove", session[id]]: socketio.emit("wait", "wait", to=session[id]) i = 0 @@ -217,7 +214,7 @@ def get_id(): if state == "add": c.execute(f"INSERT OR IGNORE INTO tags (tagid, userid) VALUES ({tag_id}, {user})") elif state == "remove": - c.execute(f"DELETE * FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ") + c.execute(f"DELETE FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ") conn.commit() finished = queue_item return make_response("True")