Pass in user_id to delete_http_function to fix error

This commit is contained in:
Peter Stockings
2023-12-20 23:55:19 +11:00
parent 2077eb835f
commit 5f1330f776

6
app.py
View File

@@ -157,10 +157,10 @@ def edit_http_function():
@login_required @login_required
def delete_http_function(): def delete_http_function():
try: try:
name = request.args.get('name')
db.delete_http_function(name)
user_id = current_user.id 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 = db.get_http_functions_for_user(user_id)
http_functions = create_http_functions_view_model(http_functions) http_functions = create_http_functions_view_model(http_functions)
return render_template("dashboard/http_functions.html", http_functions=http_functions) return render_template("dashboard/http_functions.html", http_functions=http_functions)