diff --git a/app/db.py b/app/db.py index 2b094d4..26a5a3d 100644 --- a/app/db.py +++ b/app/db.py @@ -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]