refactor: clean up project structure

- Remove old review reports (keep latest only)
- Move docs/ to deploy/docs-backup/
- Move performance-testing/ to deploy/
- Clean up test output files
- Organize root directory
This commit is contained in:
Developer
2026-04-06 23:36:03 +08:00
parent 4d71566c0d
commit 349d783fd1
697 changed files with 24114 additions and 163282 deletions

View File

@@ -370,13 +370,20 @@ func (h *GroupHandler) GetStats(c *gin.Context) {
return
}
// Get API key count
// Get API key counts
totalAPIKeys, err := h.adminService.GetGroupAPIKeyCount(ctx, groupID)
if err != nil {
response.ErrorFrom(c, err)
return
}
// Get active API key count (status = active)
activeAPIKeys, err := h.adminService.GetGroupActiveAPIKeyCount(ctx, groupID)
if err != nil {
response.ErrorFrom(c, err)
return
}
// Get today's usage stats
now := time.Now()
startOfDay := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
@@ -399,7 +406,7 @@ func (h *GroupHandler) GetStats(c *gin.Context) {
"id": group.ID,
"name": group.Name,
"total_api_keys": totalAPIKeys,
"active_api_keys": totalAPIKeys, // All keys in group are considered active
"active_api_keys": activeAPIKeys,
"total_requests": totalRequests,
"total_cost": totalCost,
})