From f02b5e8c4d606b90be3652d6e0ebc40fb8e01657 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 11 Feb 2019 20:52:47 -0600 Subject: [PATCH] Run 'crystal tool format' --- src/invidious.cr | 6 +++--- 1 file 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