DSatishchandra commited on
Commit
c9ecf28
·
verified ·
1 Parent(s): 3872b90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -88,7 +88,8 @@ def get_menu_items():
88
  result = sf.query(query)
89
  return result['records']
90
 
91
- @app.route("/")
 
92
  def index():
93
  return render_template("index.html")
94
 
@@ -114,7 +115,6 @@ def login():
114
  'Phone_Number__c': phone_number
115
  })
116
  return jsonify({'success': True, 'id': customer_login['id']}), 200
117
- return redirect("/menu") # Redirect to the menu page after successful login
118
  except Exception as e:
119
  return jsonify({'error': f'Failed to create record in Salesforce: {str(e)}'}), 500
120
 
@@ -144,7 +144,7 @@ def submit():
144
  except Exception as e:
145
  return jsonify({'error': str(e)}), 500
146
 
147
-
148
  @app.route("/menu", methods=["GET"])
149
  def menu_page():
150
  menu_items = get_menu_items() # Fetch menu items from Salesforce
 
88
  result = sf.query(query)
89
  return result['records']
90
 
91
+ # Define the route for the index page
92
+ @app.route("/")
93
  def index():
94
  return render_template("index.html")
95
 
 
115
  'Phone_Number__c': phone_number
116
  })
117
  return jsonify({'success': True, 'id': customer_login['id']}), 200
 
118
  except Exception as e:
119
  return jsonify({'error': f'Failed to create record in Salesforce: {str(e)}'}), 500
120
 
 
144
  except Exception as e:
145
  return jsonify({'error': str(e)}), 500
146
 
147
+ # Route for the menu page
148
  @app.route("/menu", methods=["GET"])
149
  def menu_page():
150
  menu_items = get_menu_items() # Fetch menu items from Salesforce