fix(rate-limit): apply on router to avoid TypeError on ws endpoint
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user