Update loader, add event and fix count to api

This commit is contained in:
jmosrael@gmail.com
2024-05-23 23:42:48 -07:00
parent 6992284cab
commit 1d28b90e76
3 changed files with 23 additions and 7 deletions

View File

@@ -36,6 +36,8 @@ app.post('/api/serverstats/gamestats', jsonParser, async (req, res) => {
'SUM(CASE WHEN status = "Complete" THEN 1 ELSE 0 END) as Complete, ' +
'SUM(CASE WHEN status = "Postponed" THEN 1 ELSE 0 END) as Postponed, ' +
'SUM(CASE WHEN status = "Pending" THEN 1 ELSE 0 END) as Pending, ' +
'SUM(event) as Events, ' +
'SUM(fix) as Fixes, ' +
'SUM(payoutEB) as TotalEB, ' +
'SUM(payoutIP) as TotalIP, ' +
'SUM(payoutEB) / SUM(CASE WHEN status = "Complete" THEN 1 ELSE 0 END) as AverageEB, ' +