Refactor config, logging, and startup structure
Introduced pkg modules for environment config, logging, and startup initialization. Replaced direct config and logging setup in main.py with modularized functions. Updated database and migration modules to use environment variables and improved DEBUG handling. Removed tool.py and migrated password utilities to pkg. Cleaned up legacy comments and unused code in models and routes.
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
from pydantic import BaseModel
|
||||
from passlib.context import CryptContext
|
||||
|
||||
# FastAPI 鉴权模型
|
||||
# FastAPI authentication model
|
||||
class Token(BaseModel):
|
||||
access_token: str
|
||||
token_type: str
|
||||
|
||||
class TokenData(BaseModel):
|
||||
username: str | None = None
|
||||
|
||||
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
||||
username: str | None = None
|
||||
Reference in New Issue
Block a user