Renamed AuthRequired/AdminRequired to auth_required/admin_required and updated all references. Replaced direct HTTPException usage with utils.http_exceptions for consistent error handling. Updated router endpoints to use new auth dependency and standardized not implemented responses. Cleaned up unused theme fields in SiteConfigResponse and improved site config endpoint. Minor type and import cleanups across routers and middleware.
10 lines
286 B
Python
10 lines
286 B
Python
from typing import Annotated
|
|
|
|
from fastapi import Depends
|
|
from sqlmodel.ext.asyncio.session import AsyncSession
|
|
|
|
from models.database import get_session
|
|
|
|
SessionDep = Annotated[AsyncSession, Depends(get_session)]
|
|
"""数据库会话依赖,用于路由函数中获取数据库会话"""
|