mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-20 15:45:46 -04:00
Syntax Fix
This commit is contained in:
parent
0b44d4639d
commit
72654728c5
@ -62,9 +62,9 @@ module Invidious::Database::SessionIDs
|
||||
PG_DB.query_one?(request, sid, as: String)
|
||||
end
|
||||
|
||||
def select_token(sid : String) : String?
|
||||
def select_one(sid : String) : {session: String, issued: Time}
|
||||
request = <<-SQL
|
||||
SELECT id FROM session_ids
|
||||
SELECT id, issued FROM session_ids
|
||||
WHERE id = $1
|
||||
SQL
|
||||
|
||||
|
@ -15,7 +15,7 @@ module Invidious::Routes::API::V1::Authentication
|
||||
if old_sid != ""
|
||||
Invidious::Database::SessionIDs.delete(sid: old_sid)
|
||||
end
|
||||
if token = Invidious::Database::SessionIDs.select_token(sid: sid)
|
||||
if token = Invidious::Database::SessionIDs.select_one(sid: sid)
|
||||
response = JSON.build do |json|
|
||||
json.object do
|
||||
json.field "session", token[:session]
|
||||
|
Loading…
x
Reference in New Issue
Block a user