Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,9 @@ from email.mime.text import MIMEText
|
|
10 |
from menu import menu_blueprint # Make sure this import is correct
|
11 |
from cart import cart_blueprint # Same for other blueprints
|
12 |
from order import order_blueprint # Same for user blueprint
|
|
|
|
|
|
|
13 |
|
14 |
|
15 |
# Initialize Flask app and Salesforce connection
|
@@ -482,7 +485,7 @@ def login():
|
|
482 |
new_reward_points = reward_points - 500
|
483 |
sf.Customer_Login__c.update(user['Id'], {"Reward_Points__c": new_reward_points})
|
484 |
|
485 |
-
return redirect(url_for("menu"))
|
486 |
|
487 |
else:
|
488 |
print("Invalid credentials!")
|
@@ -494,9 +497,6 @@ def login():
|
|
494 |
|
495 |
return render_template("login.html")
|
496 |
# Register Blueprints for each functionality
|
497 |
-
app.register_blueprint(menu_blueprint)
|
498 |
-
app.register_blueprint(cart_blueprint)
|
499 |
-
app.register_blueprint(order_blueprint)
|
500 |
|
501 |
if __name__ == "__main__":
|
502 |
app.run(debug=True, host="0.0.0.0", port=7860)
|
|
|
10 |
from menu import menu_blueprint # Make sure this import is correct
|
11 |
from cart import cart_blueprint # Same for other blueprints
|
12 |
from order import order_blueprint # Same for user blueprint
|
13 |
+
app.register_blueprint(menu_blueprint)
|
14 |
+
app.register_blueprint(cart_blueprint)
|
15 |
+
app.register_blueprint(order_blueprint)
|
16 |
|
17 |
|
18 |
# Initialize Flask app and Salesforce connection
|
|
|
485 |
new_reward_points = reward_points - 500
|
486 |
sf.Customer_Login__c.update(user['Id'], {"Reward_Points__c": new_reward_points})
|
487 |
|
488 |
+
return redirect(url_for("menu.menu"))
|
489 |
|
490 |
else:
|
491 |
print("Invalid credentials!")
|
|
|
497 |
|
498 |
return render_template("login.html")
|
499 |
# Register Blueprints for each functionality
|
|
|
|
|
|
|
500 |
|
501 |
if __name__ == "__main__":
|
502 |
app.run(debug=True, host="0.0.0.0", port=7860)
|