diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-26 13:55:45 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-26 13:55:45 -0500 |
| commit | 1202e1f2bf1817fd7e849106f7c9597e9aa9df9a (patch) | |
| tree | fe63afad7a6feab0b3a70a4878b6415c41776358 | |
| parent | 1eedd6ebf945e6ce305af8c0b7e49a6d02d18697 (diff) | |
| download | invidious-1202e1f2bf1817fd7e849106f7c9597e9aa9df9a.tar.gz invidious-1202e1f2bf1817fd7e849106f7c9597e9aa9df9a.tar.bz2 invidious-1202e1f2bf1817fd7e849106f7c9597e9aa9df9a.zip | |
Move API endpoints under '/api/v1/' prefix
| -rw-r--r-- | src/invidious.cr | 6 | ||||
| -rw-r--r-- | src/invidious/views/watch.ecr | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index b16af9a4..6662e9c6 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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) diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 06dd3d5a..1022e6fc 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -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(); }) |
