diff --git a/src/invidious.cr b/src/invidious.cr index 8d3d1894..d78f8129 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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 diff --git a/src/views/layout.ecr b/src/views/layout.ecr index 872f9a05..b2f6e52e 100644 --- a/src/views/layout.ecr +++ b/src/views/layout.ecr @@ -25,7 +25,7 @@