mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 18:35:09 +00:00
fix: APIKey查询页面数据不正确的情况
This commit is contained in:
@@ -97,7 +97,6 @@ router.post('/api/user-stats', async (req, res) => {
|
||||
|
||||
try {
|
||||
const client = redis.getClientSafe();
|
||||
const currentMonth = `${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}`;
|
||||
|
||||
// 获取所有月度模型统计(与model-stats接口相同的逻辑)
|
||||
const allModelKeys = await client.keys(`usage:${fullKeyData.id}:model:monthly:*:*`);
|
||||
|
||||
@@ -6,8 +6,6 @@ const fs = require('fs');
|
||||
const redis = require('../models/redis');
|
||||
const logger = require('../utils/logger');
|
||||
const config = require('../../config/config');
|
||||
const apiKeyService = require('../services/apiKeyService');
|
||||
const CostCalculator = require('../utils/costCalculator');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user