fix: 修复API统计和OpenAI路由问题

This commit is contained in:
shaw
2025-09-03 10:54:11 +08:00
parent 941cfacea9
commit b158a90b72
2 changed files with 9 additions and 3 deletions

View File

@@ -562,8 +562,14 @@ router.post('/api/batch-stats', async (req, res) => {
name: stats.name,
isActive: true,
usage: stats.usage,
dailyUsage: stats.dailyStats,
monthlyUsage: stats.monthlyStats
dailyUsage: {
...stats.dailyStats,
formattedCost: CostCalculator.formatCost(stats.dailyStats.cost || 0)
},
monthlyUsage: {
...stats.monthlyStats,
formattedCost: CostCalculator.formatCost(stats.monthlyStats.cost || 0)
}
})
}
})