Overhauled the way in which user details are passed to the frontend

This commit is contained in:
2024-01-19 11:57:53 +00:00
parent 19165220fa
commit b2e32d720c
5 changed files with 55 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ def index():
if products == None:
flash("No Products available")
return render_template('index.html', content="content.html", user = session.get('user'), products = products)
return render_template('index.html', content="content.html", products = products)
# Loads a given product category page
@blueprint.route('/<string:category>')
@@ -43,7 +43,7 @@ def category(category: str):
if products == None:
flash(f"No Products available in {category}")
return render_template('index.html', content="content.html", user = session.get('user'), products = products, category = category)
return render_template('index.html', content="content.html", products = products, category = category)
# Loads a given product based on ID
@blueprint.route('/<int:id>')