diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-02-11 20:52:47 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-02-11 20:52:47 -0600 |
| commit | f02b5e8c4d606b90be3652d6e0ebc40fb8e01657 (patch) | |
| tree | 39af9409602f0896f59ee56cf7d8fd2810263253 | |
| parent | f1820ffaf7cc9fe423d67e5782db7d57b9c9085a (diff) | |
| download | invidious-f02b5e8c4d606b90be3652d6e0ebc40fb8e01657.tar.gz invidious-f02b5e8c4d606b90be3652d6e0ebc40fb8e01657.tar.bz2 invidious-f02b5e8c4d606b90be3652d6e0ebc40fb8e01657.zip | |
Run 'crystal tool format'
| -rw-r--r-- | src/invidious.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index c83d0a94..285d4394 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -163,10 +163,10 @@ before_all do |env| # Invidious users only have SID if !env.request.cookies.has_key? "SSID" -email = PG_DB.query_one?("SELECT email FROM session_ids WHERE id = $1", sid, as: String) + email = PG_DB.query_one?("SELECT email FROM session_ids WHERE id = $1", sid, as: String) -if email - user = PG_DB.query_one("SELECT * FROM users WHERE email = $1", email, as: User) + if email + user = PG_DB.query_one("SELECT * FROM users WHERE email = $1", email, as: User) challenge, token = create_response(user.email, "sign_out", HMAC_KEY, PG_DB, 1.week) env.set "challenge", challenge |
