From daf8e5b8b6baa075508fe39a940afec44e4f5a71 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 1 Mar 2019 21:03:57 -0600 Subject: [PATCH] Remove array from usage statistics --- src/invidious.cr | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 70c62dbc..20bb703b 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -136,12 +136,10 @@ if config.statistics_enabled }, "openRegistrations" => config.registration_enabled, "usage" => { - { - "users" => { - "total" => PG_DB.query_one("SELECT count(*) FROM users", as: Int64), - "activeHalfyear" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '6 months'", as: Int64), - "activeMonth" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '1 month'", as: Int64), - }, + "users" => { + "total" => PG_DB.query_one("SELECT count(*) FROM users", as: Int64), + "activeHalfyear" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '6 months'", as: Int64), + "activeMonth" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '1 month'", as: Int64), }, }, "metadata" => {