Add 'lastChannelRefreshedAt' to /api/v1/stats

This commit is contained in:
Omar Roth 2019-03-01 19:55:07 -06:00
parent 057e69fe70
commit f0cc7a925c

View file

@ -146,6 +146,7 @@ if config.statistics_enabled
}, },
"metadata" => { "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,
}, },
} }