This commit is contained in:
IluaAir
2025-07-06 12:20:41 +03:00
parent b6ec15af29
commit 31879ddf30
5 changed files with 76 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ from src.core.database import async_session_maker
async def get_db() -> AsyncGenerator[AsyncSession, None]:
async with async_session_maker as db:
async with async_session_maker() as db:
yield db

View File

@@ -1,11 +1,11 @@
from src.schemas.users import UserCreate
from src.services.base import BaseService
from src.utils.auth_manager import AuthManger
class AuthService(BaseService):
async def registration(self, data: UserCreate):
...
async def registration(self, cred: UserCreate):
hashed_pass = AuthManger.get_password_hash(cred.password)
print(cred.password)
print(hashed_pass)

View File

@@ -10,3 +10,6 @@ class DBManager:
async def __aexit__(self, exc_type, exc_val, exc_tb):
await self.session.rollback()
await self.session.close()
async def commit(self):
await self.session.commit()