fix Token db interface
This commit is contained in:
1 parent
0bb7ca21cf
commit
8b94f36db5
1 file changed
+2
-2
@@ -416,7 +416,7 @@ class Token:
|
||||
|
||||
|
||||
def get_user(db_path: str, token: str) -> int:
|
||||
if not Token.exists(db_path, userid):
|
||||
if not Token.exists(db_path, token):
|
||||
raise ValueError("Token does not exist")
|
||||
|
||||
with sqlite3.connect(db_path) as connection:
|
||||
@@ -429,4 +429,4 @@ class Token:
|
||||
WHERE tkhash = ?
|
||||
''', (tkhash, ))
|
||||
|
||||
return cursor.fetcone()[0]
|
||||
return cursor.fetchone()[0]
|
||||
Reference in new issue
Block a user