mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix: user stats in admin panel
This commit is contained in:
@@ -577,8 +577,8 @@ router.get('/:userId/usage-stats', authenticateUserOrAdmin, requireAdmin, async
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户的API Keys
|
||||
const userApiKeys = await apiKeyService.getUserApiKeys(userId)
|
||||
// 获取用户的API Keys(包括已删除的以保留统计数据)
|
||||
const userApiKeys = await apiKeyService.getUserApiKeys(userId, true)
|
||||
const apiKeyIds = userApiKeys.map((key) => key.id)
|
||||
|
||||
if (apiKeyIds.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user