mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-03 06:02:08 +00:00
Add fix for testing authentication
This commit is contained in:
@@ -164,8 +164,8 @@ spawn do
|
||||
end
|
||||
end
|
||||
|
||||
before_get do |env|
|
||||
if env.request.cookies["SID"]?
|
||||
before_all do |env|
|
||||
if env.request.cookies.has_key?("SID")
|
||||
env.set "authorized", true
|
||||
else
|
||||
env.set "authorized", false
|
||||
@@ -551,7 +551,7 @@ end
|
||||
|
||||
# Get subscriptions for authorized user
|
||||
get "/feed/subscriptions" do |env|
|
||||
authorized = env.get "authorized"
|
||||
authorized = env.get? "authorized"
|
||||
|
||||
if authorized
|
||||
max_results = env.params.query["maxResults"]?.try &.to_i
|
||||
|
||||
Reference in New Issue
Block a user