webcodelab commited on
Commit
0660026
·
verified ·
1 Parent(s): 1c83b72

Update app/routes.py

Browse files
Files changed (1) hide show
  1. app/routes.py +13 -0
app/routes.py CHANGED
@@ -229,3 +229,16 @@ def try_api():
229
  )
230
  except Exception as e:
231
  return render_template('docs.html', response=f" Error: {str(e)}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  )
230
  except Exception as e:
231
  return render_template('docs.html', response=f" Error: {str(e)}")
232
+
233
+
234
+
235
+
236
+ @auth.route('/ping-db')
237
+ def ping_db():
238
+ try:
239
+ # Try to count users in the database
240
+ count = User.query.count()
241
+ return f"✅ Connected to DB. Users count: {count}"
242
+ except Exception as e:
243
+ return f"❌ DB Error: {e}"
244
+