fix(rate-limit): apply on router to avoid TypeError on ws endpoint

This commit is contained in:
MingxuanGame
2025-08-28 16:41:33 +00:00
parent 4324d7ed2b
commit fdb08fe31f
5 changed files with 23 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
from __future__ import annotations
from app.dependencies.rate_limit import LIMITERS
from fastapi import APIRouter
router = APIRouter(prefix="/api/v2")
# 导入所有子路由模块来注册路由
router = APIRouter(prefix="/api/v2", dependencies=LIMITERS)