summaryrefslogtreecommitdiff
path: root/minionlivesmatter/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'minionlivesmatter/templates/index.html')
-rw-r--r--minionlivesmatter/templates/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/minionlivesmatter/templates/index.html b/minionlivesmatter/templates/index.html
index 2f5aad7..e6b6ee1 100644
--- a/minionlivesmatter/templates/index.html
+++ b/minionlivesmatter/templates/index.html
@@ -261,9 +261,9 @@
<script type="text/javascript">
- var minions_per_second = {{ sql_val("SELECT SUM(minion_kills)/SUM(match.duration)::FLOAT FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }};
+ var minions_per_second = {{ sql_val("SELECT SUM(minion_kills)/(24*60*60)::FLOAT FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }};
var minions = 0;
- // sum(minions killed) / sum(game lengh s)
+ // sum(minions killed) / (seconds per day)
setInterval(() => {
minions += minions_per_second;
$("#minions-killed-now").text(Math.floor(minions));