Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -251,13 +251,13 @@ def customer_details():
|
|
| 251 |
"reward_points": customer.get("Reward_Points__c", 0)
|
| 252 |
}
|
| 253 |
|
| 254 |
-
# Return the customer details as
|
| 255 |
return render_template("customer_details.html", customer=customer_data)
|
| 256 |
|
| 257 |
except Exception as e:
|
| 258 |
print(f"Error fetching customer details: {str(e)}")
|
| 259 |
return jsonify({"success": False, "message": f"Error fetching customer details: {str(e)}"})
|
| 260 |
-
|
| 261 |
@app.route("/order-history", methods=["GET"])
|
| 262 |
def order_history():
|
| 263 |
email = session.get('user_email') # Get logged-in user's email
|
|
|
|
| 251 |
"reward_points": customer.get("Reward_Points__c", 0)
|
| 252 |
}
|
| 253 |
|
| 254 |
+
# Return the customer details as rendered HTML
|
| 255 |
return render_template("customer_details.html", customer=customer_data)
|
| 256 |
|
| 257 |
except Exception as e:
|
| 258 |
print(f"Error fetching customer details: {str(e)}")
|
| 259 |
return jsonify({"success": False, "message": f"Error fetching customer details: {str(e)}"})
|
| 260 |
+
|
| 261 |
@app.route("/order-history", methods=["GET"])
|
| 262 |
def order_history():
|
| 263 |
email = session.get('user_email') # Get logged-in user's email
|