From 5f1330f776552124539e3bb1052dbfe014107122 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Wed, 20 Dec 2023 23:55:19 +1100 Subject: [PATCH] Pass in user_id to delete_http_function to fix error --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 44772bb..c876ba6 100644 --- a/app.py +++ b/app.py @@ -157,10 +157,10 @@ def edit_http_function(): @login_required def delete_http_function(): try: - name = request.args.get('name') - db.delete_http_function(name) - user_id = current_user.id + name = request.args.get('name') + db.delete_http_function(user_id, name) + http_functions = db.get_http_functions_for_user(user_id) http_functions = create_http_functions_view_model(http_functions) return render_template("dashboard/http_functions.html", http_functions=http_functions)