Jon Solow
commited on
Commit
·
a7739f9
1
Parent(s):
0b5b559
Fix reference to login token lookup
Browse files- src/data_storage.py +1 -1
src/data_storage.py
CHANGED
@@ -82,7 +82,7 @@ def login_by_token(token: str):
|
|
82 |
# returns true if logged in successfully
|
83 |
with get_db_connection() as con:
|
84 |
cur = con.cursor()
|
85 |
-
query_result = cur.execute(f"select user_id from
|
86 |
if query_result:
|
87 |
user_id = query_result[0]
|
88 |
else:
|
|
|
82 |
# returns true if logged in successfully
|
83 |
with get_db_connection() as con:
|
84 |
cur = con.cursor()
|
85 |
+
query_result = cur.execute(f"select user_id from tokens where token = '{token}'").fetchone()
|
86 |
if query_result:
|
87 |
user_id = query_result[0]
|
88 |
else:
|