add User return schema

This commit is contained in:
IluaAir
2025-07-13 11:41:58 +03:00
parent d27aafb4f6
commit f3030593da
12 changed files with 102 additions and 64 deletions

View File

@@ -6,11 +6,8 @@ from src.repository.users import UsersRepo
class IUnitOfWork(Protocol):
user: UsersRepo
async def __aenter__(self) -> "IUnitOfWork":
...
async def __aenter__(self) -> "IUnitOfWork": ...
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
...
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: ...
async def commit(self) -> None:
...
async def commit(self) -> None: ...

View File

@@ -24,10 +24,9 @@ class DbSettings(BaseModel):
class AccessToken(BaseSettings):
model_config = SettingsConfigDict(env_file='.env',
env_file_encoding='utf-8',
env_prefix="ACCESS_TOKEN_"
)
model_config = SettingsConfigDict(
env_file=".env", env_file_encoding="utf-8", env_prefix="ACCESS_TOKEN_"
)
expire_minutes: int = 15
secret_key: str
algorithm: str = "HS256"
@@ -40,4 +39,4 @@ class Settings(BaseSettings):
settings = Settings()
print(settings.db.url)
print(settings.db.url)