diff --git a/main.py b/main.py index 9e5c43f..2ef109f 100644 --- a/main.py +++ b/main.py @@ -46,7 +46,7 @@ def list(): @app.route("/list/user", methods=['GET']) def user_info(): - username = request.args.get("user") + username = '%s' % request.args.get("user") c.execute("SELECT * FROM users WHERE username = '%s'" % username) user = c.fetchall() if user != []: @@ -67,8 +67,8 @@ def new_user(): @app.route("/removeuser", methods=['GET']) def remove_user(): user_id = '%s' % request.args.get("id") - c.execute(f"DELETE * FROM tags WHERE (userid = {user_id}) ") #Ist hier noch eine Bestätigung nötig? - c.execute(f"DELETE * FROM users WHERE (id={user_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() @app.route("/adduser/user", methods=['GET'])