From 218a9cb6a7fddb81f249c04fbc7eb74670b98737 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 14 Jun 2023 19:36:30 +0200 Subject: [PATCH] Deleted * from sql --- main.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index c765c1c..581de29 100644 --- a/main.py +++ b/main.py @@ -68,12 +68,8 @@ def new_user(): def remove_user(): user_id = request.args.get("id") #Noch eine Bestätigung nötig - c.execute(f"SELECT * FROM tags WHERE userid={user_id}") - if c.fetchall != []: - c.execute(f"DELETE * FROM tags WHERE userid={user_id}") - c.execute(f"SELECT * FROM useres WHERE id={user_id}") - if c.fetchall != []: - c.execute(f"DELETE * FROM users WHERE id={user_id}") + c.execute(f"DELETE FROM tags WHERE userid={user_id}") + c.execute(f"DELETE FROM users WHERE id={user_id}") conn.commit() @app.route("/adduser/user", methods=['GET'])