Expiration date should be nil when theres no token

This commit is contained in:
Alex Ling
2021-03-05 11:01:00 +00:00
parent 371c8056e7
commit 8aab113aab
2 changed files with 9 additions and 3 deletions

View File

@@ -530,9 +530,9 @@ class Storage
end
end
def get_md_token(username) : Tuple(String?, Time)
def get_md_token(username) : Tuple(String?, Time?)
token = nil
expires = Time.utc
expires = nil
MainFiber.run do
get_db do |db|
db.query_one? "select token, expire from md_account where " \