DSatishchandra commited on
Commit
c19d3b6
·
verified ·
1 Parent(s): 6d22945

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -101,7 +101,8 @@ def create_salesforce_record(name, email, phone_number):
101
  print(f"Error creating Salesforce record: {error_message}")
102
  return {"error": f"Failed to create record in Salesforce: {error_message}"}
103
 
104
- @app.route("/submit", methods=["POST"])
 
105
  def submit():
106
  data = request.json
107
  name = data.get('name')
@@ -127,7 +128,6 @@ def submit():
127
  except Exception as e:
128
  return jsonify({'error': str(e)}), 500
129
 
130
-
131
  @app.route("/")
132
  def index():
133
  return render_template("index.html")
 
101
  print(f"Error creating Salesforce record: {error_message}")
102
  return {"error": f"Failed to create record in Salesforce: {error_message}"}
103
 
104
+ # Correct the indentation here
105
+ @app.route("/submit", methods=["POST"])
106
  def submit():
107
  data = request.json
108
  name = data.get('name')
 
128
  except Exception as e:
129
  return jsonify({'error': str(e)}), 500
130
 
 
131
  @app.route("/")
132
  def index():
133
  return render_template("index.html")