summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-09-19 10:37:00 -0500
committerOmar Roth <omarroth@hotmail.com>2018-09-19 10:37:00 -0500
commit0f5b93e394f918d56e25e5c889621a43f65fa6bd (patch)
tree74f84cbb61d6b5b550c0e886c4bf162fe00e762d /src/invidious.cr
parent54f9941c7b40706510c664f8bc2ef876eda866db (diff)
downloadinvidious-0f5b93e394f918d56e25e5c889621a43f65fa6bd.tar.gz
invidious-0f5b93e394f918d56e25e5c889621a43f65fa6bd.tar.bz2
invidious-0f5b93e394f918d56e25e5c889621a43f65fa6bd.zip
Add 'authorId' to /api/v1/trending and /api/v1/top
Diffstat (limited to 'src/invidious.cr')
-rw-r--r--src/invidious.cr2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index fdefa029..ddc9b1b0 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -2405,6 +2405,7 @@ get "/api/v1/trending" do |env|
json.field "viewCount", video.views
json.field "author", video.author
+ json.field "authorId", video.ucid
json.field "authorUrl", "/channel/#{video.ucid}"
json.field "published", video.published.epoch
@@ -2435,6 +2436,7 @@ get "/api/v1/top" do |env|
json.field "viewCount", video.views
json.field "author", video.author
+ json.field "authorId", video.ucid
json.field "authorUrl", "/channel/#{video.ucid}"
json.field "published", video.published.epoch
json.field "publishedText", "#{recode_date(video.published)} ago"