diff --git a/src/routes/system.js b/src/routes/system.js index c980b8d..1ffb7d2 100644 --- a/src/routes/system.js +++ b/src/routes/system.js @@ -59,7 +59,7 @@ router.get('/health', (req, res) => { * GET /stats * System statistics */ -router.get('/stats', (req, res) => { +router.get('/stats', async(req, res) => { try { // Mint counts by status const mintCounts = countMintsByStatus(); @@ -102,7 +102,7 @@ router.get('/stats', (req, res) => { const recentReviews = getRecentReviews(5); // Trending mints - const trending = getTrendingMints(5); + const trending = await getTrendingMints(5); res.json({ mints: { @@ -121,7 +121,7 @@ router.get('/stats', (req, res) => { trending_mints: trending.map(m => ({ mint_id: m.mint_id, name: m.name, - views_7d: m.views_7d + views_7d: m.view_count })), computed_at: nowISO() });