From 24973d555df74051035286db669460f46ad76313 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 14 Jun 2023 18:56:26 +0200 Subject: [PATCH] fixed error in /removeuser --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index e23b749..cb7ff35 100644 --- a/main.py +++ b/main.py @@ -66,9 +66,7 @@ def new_user(): @app.route("/removeuser", methods=['GET']) def remove_user(): - user_name = request.args.get("id") - c.execute("SELECT * FROM users WHERE username = '%s'" % user_name) - user_id = c.fetchall()[0][0] + user_id = request.args.get("id") c.execute(f"DELETE * FROM tags WHERE userid={user_id}") #Noch eine Bestätigung nötig c.execute(f"DELETE * FROM users WHERE id={user_id}") conn.commit()