DSatishchandra commited on
Commit
114caee
·
verified ·
1 Parent(s): c9ecf28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -114,7 +114,7 @@ def login():
114
  'Email__c': email,
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,6 +144,12 @@ def submit():
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():
 
114
  'Email__c': email,
115
  'Phone_Number__c': phone_number
116
  })
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
  except Exception as e:
145
  return jsonify({'error': str(e)}), 500
146
 
147
+ @app.route("/dashboard", methods=["GET"])
148
+ def dashboard():
149
+ # You can pass user-specific data to this page if needed
150
+ return render_template("dashboard.html") # Render the dashboard template
151
+
152
+
153
  # Route for the menu page
154
  @app.route("/menu", methods=["GET"])
155
  def menu_page():