diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-03-01 19:55:07 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-03-01 19:55:07 -0600 |
| commit | f0cc7a925c3e936c30b5b4781ff27c9f03a34071 (patch) | |
| tree | 8ac1299c90f97ec975439a4274d5566b081c3594 | |
| parent | 057e69fe703a151574137bf2aa9518d90e640bfe (diff) | |
| download | invidious-f0cc7a925c3e936c30b5b4781ff27c9f03a34071.tar.gz invidious-f0cc7a925c3e936c30b5b4781ff27c9f03a34071.tar.bz2 invidious-f0cc7a925c3e936c30b5b4781ff27c9f03a34071.zip | |
Add 'lastChannelRefreshedAt' to /api/v1/stats
| -rw-r--r-- | src/invidious.cr | 3 |
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, }, } |
