From 6e95607285e8faaac2d1cd619b81b72adcb1aa19 Mon Sep 17 00:00:00 2001 From: shaw Date: Wed, 26 Nov 2025 10:09:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dapikeys=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=AA=97=E5=8F=A3=E9=99=90=E5=88=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/routes/admin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3faacf8..30eef33d 100644 --- a/README.md +++ b/README.md @@ -953,7 +953,7 @@ proxy_request_buffering off;
- Sponsor + Sponsor diff --git a/src/routes/admin.js b/src/routes/admin.js index a0b410dc..1d7c823f 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -718,7 +718,7 @@ async function calculateKeyStats(keyId, timeRange, startDate, endDate) { allTimeCost = parseFloat((await client.get(totalCostKey)) || '0') // 获取 API Key 配置信息以判断是否需要窗口数据 - const apiKey = await redis.getApiKeyById(keyId) + const apiKey = await redis.getApiKey(keyId) if (apiKey && apiKey.rateLimitWindow > 0) { const costCountKey = `rate_limit:cost:${keyId}` const windowStartKey = `rate_limit:window_start:${keyId}`