summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2019-03-01 19:55:07 -0600
committerOmar Roth <omarroth@hotmail.com>2019-03-01 19:55:07 -0600
commitf0cc7a925c3e936c30b5b4781ff27c9f03a34071 (patch)
tree8ac1299c90f97ec975439a4274d5566b081c3594 /src
parent057e69fe703a151574137bf2aa9518d90e640bfe (diff)
downloadinvidious-f0cc7a925c3e936c30b5b4781ff27c9f03a34071.tar.gz
invidious-f0cc7a925c3e936c30b5b4781ff27c9f03a34071.tar.bz2
invidious-f0cc7a925c3e936c30b5b4781ff27c9f03a34071.zip
Add 'lastChannelRefreshedAt' to /api/v1/stats
Diffstat (limited to 'src')
-rw-r--r--src/invidious.cr3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 7222e264..70c62dbc 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -145,7 +145,8 @@ if config.statistics_enabled
},
},
"metadata" => {
- "updatedAt" => Time.now.to_unix,
+ "updatedAt" => Time.now.to_unix,
+ "lastChannelRefreshedAt" => PG_DB.query_one?("SELECT updated FROM channels ORDER BY updated DESC LIMIT 1", as: Time).try &.to_unix || 0,
},
}