mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add alias '/api/v1/channels/videos/:ucid'
This commit is contained in:
parent
8500a62462
commit
54f9941c7b
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue