lokesh341 commited on
Commit
255fbf0
·
verified ·
1 Parent(s): 5ef3837

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -29,12 +29,14 @@ try:
29
  except Exception as e:
30
  print(f"❌ Failed to connect to Salesforce: {str(e)}")
31
 
32
- # ✅ List All Routes at Startup
33
- @app.before_first_request
34
  def print_routes():
35
- print("\n✅ Available Routes:")
36
- for rule in app.url_map.iter_rules():
37
- print(f" {rule}")
 
 
38
 
39
  # ✅ ROUTE: List All Routes for Debugging
40
  @app.route("/routes", methods=["GET"])
 
29
  except Exception as e:
30
  print(f"❌ Failed to connect to Salesforce: {str(e)}")
31
 
32
+ # ✅ Print Available Routes on First Request
33
+ @app.before_request
34
  def print_routes():
35
+ if not hasattr(app, 'printed_routes'):
36
+ app.printed_routes = True
37
+ print("\n✅ Available Routes:")
38
+ for rule in app.url_map.iter_rules():
39
+ print(f"➡ {rule}")
40
 
41
  # ✅ ROUTE: List All Routes for Debugging
42
  @app.route("/routes", methods=["GET"])