diff --git a/main.py b/main.py index 581de29..79c7d19 100644 --- a/main.py +++ b/main.py @@ -64,13 +64,21 @@ def user_info(): def new_user(): return render_template("adduser.html") +@app.rout("/removeuser/confirmation", methods=['GET']) +def confirm_remove_user(): + user_id = request.args.get("id") + return f'' + @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}") c.execute(f"DELETE FROM users WHERE id={user_id}") conn.commit() + return f'
Deleted user {user_name}
return to the tags and user list' @app.route("/adduser/user", methods=['GET']) def adduser():