535d97a70c
17-table PostgreSQL schema with full Chinese column comments, FastAPI project structure (admin/common/modules), DSL rule files, and schema migration scripts.
16 lines
410 B
Python
16 lines
410 B
Python
"""控制器包(需要 JWT 鉴权)。"""
|
|
|
|
from typing import Any
|
|
|
|
from fastapi import APIRouter, Depends, Request
|
|
|
|
from fastapi_common.fastapi_common_security.security import verify_access_token
|
|
|
|
|
|
async def jwt_auth_dependency(RequestObj: Request) -> dict[str, Any]:
|
|
"""JWT 鉴权依赖。"""
|
|
return verify_access_token(RequestObj)
|
|
|
|
|
|
router = APIRouter(dependencies=[Depends(jwt_auth_dependency)])
|