From 5914ca383ac9daaf37b1349b2de9d049316e298e Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 14 Jun 2023 19:28:35 +0200 Subject: [PATCH] Debuging? --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 06aa8b0..c765c1c 100644 --- a/main.py +++ b/main.py @@ -68,8 +68,12 @@ def new_user(): def remove_user(): user_id = request.args.get("id") #Noch eine Bestätigung nötig - c.execute(f"DELETE * FROM tags WHERE userid={user_id}") - c.execute(f"DELETE * FROM users WHERE id={user_id}") + 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}") conn.commit() @app.route("/adduser/user", methods=['GET'])