add User return schema
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user