Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
# ✅
|
33 |
-
@app.
|
34 |
def print_routes():
|
35 |
-
|
36 |
-
|
37 |
-
print(
|
|
|
|
|
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"])
|