From 1f518ff56d204da6e1b55f933fb80b340db4e9d1 Mon Sep 17 00:00:00 2001 From: Luke Else Date: Tue, 23 Jan 2024 13:30:18 +0000 Subject: [PATCH] Removed redirection code as not needed --- controllers/web/product.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/web/product.py b/controllers/web/product.py index 28c5340..32d3482 100644 --- a/controllers/web/product.py +++ b/controllers/web/product.py @@ -75,7 +75,7 @@ def display_add_product(): # User needs to be logged in as a seller to view this page if not is_role("Seller"): flash("You must be logged in as a seller to view this page!") - return redirect("/", code=401) + return redirect("/") return render_template('index.html', content='new_product.html') @@ -90,7 +90,7 @@ def add_product(): # User needs to be logged in as a seller to view this page if not is_role("Seller"): flash("You must be logged in as a seller to view this page!") - return redirect("/", code=401) + return redirect("/") file = request.files.get('image') @@ -127,7 +127,7 @@ def display_own_products(): # User must be logged in as seller to view page if not is_role("Seller"): flash("You must be logged in as a seller to view this page!") - return redirect("/", code=401) + return redirect("/") db = ProductController() products = db.read_user(user_id)