LogicGoInfotechSpaces commited on
Commit
223bd89
·
verified ·
1 Parent(s): 8c694d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -141,6 +141,14 @@ async def view_details(image_id: str):
141
  if image_id not in OCR_RESULTS:
142
  raise HTTPException(status_code=404, detail="No OCR result found for this ID")
143
  return OCR_RESULTS[image_id]
 
 
 
 
 
 
 
 
144
 
145
 
146
  # --------------------------------------------------
 
141
  if image_id not in OCR_RESULTS:
142
  raise HTTPException(status_code=404, detail="No OCR result found for this ID")
143
  return OCR_RESULTS[image_id]
144
+ @app.get("/debug/db")
145
+ async def debug_db():
146
+ return {"db_name": _db.name, "collections": await _db.list_collection_names()}
147
+
148
+ @app.get("/debug/test-write")
149
+ async def test_write():
150
+ res = await _db["debug_test"].insert_one({"ping": "ok"})
151
+ return {"inserted_id": str(res.inserted_id)}
152
 
153
 
154
  # --------------------------------------------------