diff --git a/api/stats.js b/api/stats.js index 6984992..4605658 100644 --- a/api/stats.js +++ b/api/stats.js @@ -22,4 +22,22 @@ api.get('/char_stats/:batch', async (req, res, next) => { } }); +api.get('/char_stats_bep/:batch', async (req, res, next) => { + try { + const stats = await db.get_stats(); + + stats.empires = { "TR": 0, "NC": 0, "VS": 0 } + + var batch = req.params.batch; + + const avatars = await db.get_character_batch_for_stats(batch, AVATAR.BEP, SQL_ORDER.DESCENDING); + + res.status(200).json({ players: avatars }); + + } catch (e) { + console.log(e); + res.status(500).json({ message: 'error' }); + } +}); + export default api; \ No newline at end of file