mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add handling for invalid login
This commit is contained in:
parent
58b5e97fc4
commit
7494e864b4
1 changed files with 6 additions and 3 deletions
|
@ -220,10 +220,13 @@ before_all do |env|
|
||||||
|
|
||||||
sid = env.request.cookies["SID"].value
|
sid = env.request.cookies["SID"].value
|
||||||
|
|
||||||
|
begin
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
user = get_user(sid, client, headers, PG_DB, false)
|
user = get_user(sid, client, headers, PG_DB, false)
|
||||||
|
|
||||||
env.set "user", user
|
env.set "user", user
|
||||||
|
rescue ex
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue