From 1202e1f2bf1817fd7e849106f7c9597e9aa9df9a Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 26 Jul 2018 13:55:45 -0500 Subject: [PATCH] Move API endpoints under '/api/v1/' prefix --- src/invidious.cr | 6 +++--- src/invidious/views/watch.ecr | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index b16af9a40..6662e9c67 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 06dd3d5a5..1022e6fc9 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -49,7 +49,7 @@ <% end %> <% captions.each do |caption| %> - " + " 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(); })