Spaces:
Runtime error
Runtime error
Update cart.py
Browse files
cart.py
CHANGED
@@ -404,4 +404,10 @@ def get_loyalty_data():
|
|
404 |
return jsonify({"success": True, "data": loyalty_data})
|
405 |
|
406 |
except Exception as e:
|
407 |
-
return jsonify({"success": False, "error": str(e)})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
return jsonify({"success": True, "data": loyalty_data})
|
405 |
|
406 |
except Exception as e:
|
407 |
+
return jsonify({"success": False, "error": str(e)})
|
408 |
+
@cart_blueprint.route("/loyalty_page", methods=["GET"])
|
409 |
+
def loyalty_page():
|
410 |
+
email = session.get('user_email')
|
411 |
+
if not email:
|
412 |
+
return redirect(url_for('login')) # Redirect to login if not authenticated
|
413 |
+
return render_template("loyalty.html") # Render the loyalty page
|