From c516ba920c086d27b586ec0ebf519b4d0a1c3b82 Mon Sep 17 00:00:00 2001 From: StepanovPlaton Date: Sat, 15 Jun 2024 18:24:46 +0400 Subject: [PATCH] Disable sql requests printing --- database/database.py | 2 +- routes/auth.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/database/database.py b/database/database.py index c538e70..017a098 100644 --- a/database/database.py +++ b/database/database.py @@ -8,7 +8,7 @@ DATABASE_URL = Env.get_strict("SQLALCHEMY_DATABASE_URL", str) # DATABASE_URL = "postgresql://user:password@postgresserver/db" engine = create_async_engine( - DATABASE_URL, connect_args={"check_same_thread": False}, echo=True + DATABASE_URL, connect_args={"check_same_thread": False} # , echo=True ) async_session = sessionmaker( # type: ignore engine, class_=AsyncSession, expire_on_commit=False) # type: ignore diff --git a/routes/auth.py b/routes/auth.py index bbd62c1..6354d37 100644 --- a/routes/auth.py +++ b/routes/auth.py @@ -49,7 +49,6 @@ async def get_user(token: str = Depends(oauth2_scheme), print(e) raise credentials_exception user = await db.get_user(db_session, token_data.username) - print(user) if user is None: raise credentials_exception return user