fix: 修复apikeys页面窗口限制显示错误的bug

This commit is contained in:
shaw
2025-11-26 10:09:58 +08:00
parent 86cf907f3b
commit 6e95607285
2 changed files with 2 additions and 2 deletions

View File

@@ -953,7 +953,7 @@ proxy_request_buffering off;
<div align="center">
<a href="https://afdian.com/a/claude-relay-service" target="_blank">
<img src="https://img.shields.io/badge/☕_请我喝杯咖啡-爱发电-946ce6?style=for-the-badge&logo=buy-me-a-coffee&logoColor=white" alt="Sponsor">
<img src="https://img.shields.io/badge/请我喝杯咖啡-爱发电-946ce6?style=for-the-badge&logo=buy-me-a-coffee&logoColor=white" alt="Sponsor">
</a>
<table>

View File

@@ -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}`