Pass in user_id to delete_http_function to fix error
This commit is contained in:
6
app.py
6
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)
|
||||
|
||||
Reference in New Issue
Block a user