mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Move API endpoints under '/api/v1/' prefix
This commit is contained in:
parent
1eedd6ebf9
commit
1202e1f2bf
2 changed files with 5 additions and 5 deletions
|
@ -411,7 +411,7 @@ get "/watch" do |env|
|
|||
templated "watch"
|
||||
end
|
||||
|
||||
get "/captions/:id" do |env|
|
||||
get "/api/v1/captions/:id" do |env|
|
||||
id = env.params.url["id"]
|
||||
|
||||
client = make_client(YT_URL)
|
||||
|
@ -497,7 +497,7 @@ get "/captions/:id" do |env|
|
|||
webvtt
|
||||
end
|
||||
|
||||
get "/comments/:id" do |env|
|
||||
get "/api/v1/comments/:id" do |env|
|
||||
id = env.params.url["id"]
|
||||
|
||||
source = env.params.query["source"]?
|
||||
|
@ -653,7 +653,7 @@ get "/comments/:id" do |env|
|
|||
end
|
||||
end
|
||||
|
||||
get "/videos/:id" do |env|
|
||||
get "/api/v1/videos/:id" do |env|
|
||||
id = env.params.url["id"]
|
||||
|
||||
client = make_client(YT_URL)
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<% end %>
|
||||
|
||||
<% captions.each do |caption| %>
|
||||
<track kind="captions" src="/captions/<%= video.id %>?label=<%= caption["name"]["simpleText"] %>"
|
||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption["name"]["simpleText"] %>"
|
||||
srclang="<%= caption["languageCode"] %>" label="<%= caption["name"]["simpleText"]%> ">
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -158,7 +158,7 @@ for ( var i = 0; i < currentSources.length; i++ ) {
|
|||
player.src(currentSources);
|
||||
<% end %>
|
||||
|
||||
fetch("/comments/<%= video.id %>?source=reddit")
|
||||
fetch("/api/v1/comments/<%= video.id %>?source=reddit")
|
||||
.then(function(response) {
|
||||
return response.json();
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue