Skip to content

Commit

Permalink
Add 'lastChannelRefreshedAt' to /api/v1/stats
Browse files Browse the repository at this point in the history
  • Loading branch information
omarroth committed Mar 2, 2019
1 parent 057e69f commit f0cc7a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/invidious.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}

Expand Down

0 comments on commit f0cc7a9

Please sign in to comment.