Remove useless 'locale = env.get...' from many routes

This commit is contained in:
Samantaz Fox
2022-01-20 16:03:04 +01:00
parent fa99c9aa85
commit 4cd7a3e83f
4 changed files with 1 additions and 24 deletions

View File

@@ -1,7 +1,6 @@
module Invidious::Routes::API::V1::Misc
# Stats API endpoint for Invidious
def self.stats(env)
locale = env.get("preferences").as(Preferences).locale
env.response.content_type = "application/json"
if !CONFIG.statistics_enabled
@@ -15,8 +14,6 @@ module Invidious::Routes::API::V1::Misc
# user playlists and Invidious playlists. This means that we can't
# reasonably split them yet. This should be addressed in APIv2
def self.get_playlist(env : HTTP::Server::Context)
locale = env.get("preferences").as(Preferences).locale
env.response.content_type = "application/json"
plid = env.params.url["plid"]