mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-23 22:13:37 +00:00
Add alias '/api/v1/channels/videos/:ucid'
This commit is contained in:
parent
8500a62462
commit
54f9941c7b
@ -2634,7 +2634,8 @@ get "/api/v1/channels/:ucid" do |env|
|
|||||||
channel_info
|
channel_info
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/api/v1/channels/:ucid/videos" do |env|
|
["/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"].each do |route|
|
||||||
|
get route do |env|
|
||||||
ucid = env.params.url["ucid"]
|
ucid = env.params.url["ucid"]
|
||||||
page = env.params.query["page"]?.try &.to_i?
|
page = env.params.query["page"]?.try &.to_i?
|
||||||
page ||= 1
|
page ||= 1
|
||||||
@ -2731,6 +2732,7 @@ get "/api/v1/channels/:ucid/videos" do |env|
|
|||||||
env.response.content_type = "application/json"
|
env.response.content_type = "application/json"
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
get "/api/v1/search" do |env|
|
get "/api/v1/search" do |env|
|
||||||
query = env.params.query["q"]?
|
query = env.params.query["q"]?
|
||||||
|
Loading…
Reference in New Issue
Block a user