diff --git a/src/invidious/helpers/redis_tokens.cr b/src/invidious/helpers/redis_tokens.cr index a6b6196c..b79dab51 100644 --- a/src/invidious/helpers/redis_tokens.cr +++ b/src/invidious/helpers/redis_tokens.cr @@ -7,13 +7,19 @@ module Tokens @@po_token = REDIS_DB.get("invidious:po_token") @@visitor_data = REDIS_DB.get("invidious:visitor_data") if !@@po_token.nil? && !@@visitor_data.nil? - LOGGER.debug("RefreshTokens: Successfully updated tokens") + set_tokens + LOGGER.debug("RefreshTokens: Successfully updated po_token and visitor_data") else LOGGER.warn("RefreshTokens: Tokens are empty!") end LOGGER.trace("RefreshTokens: Tokens are:") - LOGGER.trace("RefreshTokens: po_token: #{@@po_token}") - LOGGER.trace("RefreshTokens: visitor_data: #{@@visitor_data}") + LOGGER.trace("RefreshTokens: po_token: #{CONFIG.po_token}") + LOGGER.trace("RefreshTokens: visitor_data: #{CONFIG.visitor_data}") + end + + def set_tokens + CONFIG.po_token = @@po_token + CONFIG.visitor_data = @@visitor_data end def get_tokens diff --git a/src/invidious/views/user/tokens.ecr b/src/invidious/views/user/tokens.ecr deleted file mode 100644 index 768a1968..00000000 --- a/src/invidious/views/user/tokens.ecr +++ /dev/null @@ -1,15 +0,0 @@ -<% content_for "header" do %> -
po_token and visitor_data successfully generated!
-po_token: <%= po_token %>
-visitor_data: <%= visitor_data %>
-