diff --git a/app/controller/test_connection.py b/app/controller/test_connection.py index 09a36c9..7559908 100644 --- a/app/controller/test_connection.py +++ b/app/controller/test_connection.py @@ -17,3 +17,15 @@ def add_test_connection_route(app: FastAPI): return { "result": list[0] if list else None } + + @app.get("/query_llm_user2") + async def query_llm_user(username: str, session: AsyncSessionDep): + result = await (await session.connection()).exec_driver_sql( + "select * from llm_user where username = %s", + tuple([username]) + ) + print("result", result) + list = [dict(row._mapping) for row in result] + return { + "result": list[0] if list else None + }