Move remaining routes to new structure

This commit is contained in:
matthewmcgarvey
2022-02-22 23:20:09 -06:00
parent cc59de0c93
commit 3b1837a99b
4 changed files with 44 additions and 44 deletions

View File

@@ -443,4 +443,15 @@ module Invidious::Routes::Playlists
templated "mix"
end
# Undocumented, creates anonymous playlist with specified 'video_ids', max 50 videos
def self.watch_videos(env)
response = YT_POOL.client &.get(env.request.resource)
if url = response.headers["Location"]?
url = URI.parse(url).request_target
return env.redirect url
end
env.response.status_code = response.status_code
end
end