diff --git a/main.py b/main.py index 28aee3c..34aaee6 100644 --- a/main.py +++ b/main.py @@ -59,6 +59,18 @@ async def upload(file: UploadFile): return {"status": "success"} +@app.get('/test-db', dependencies=[Depends(authenticate)]) +async def test_db(): + conn = connect_db() + try: + with conn.cursor() as cur: + cur.execute("select 1") + cur.fetchall() + return "If you're reading this, you're ready to update NAVs" + except Exception as e: + return "No bueno" + e + + @app.post("/update-nav", dependencies=[Depends(authenticate)]) async def update_nav(data: list[dict]): """Upsert the NAV data into the nav_history table"""