aboutsummaryrefslogtreecommitdiff
path: root/app/auth.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-02-26 16:31:09 -0600
committerParker <contact@pkrm.dev>2024-02-26 16:31:09 -0600
commita0bfa5440603841c40e6a29495ca49c09a5d8c83 (patch)
tree338dfb66b0bb4d26f7755b58770f130b434aaa71 /app/auth.py
parentec4c5f0c34a4d2071aaf37aa768808c4b3741de7 (diff)
working on changing from flask -> fastapi
Diffstat (limited to 'app/auth.py')
-rw-r--r--app/auth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/auth.py b/app/auth.py
index c9fe89b..aa278f2 100644
--- a/app/auth.py
+++ b/app/auth.py
@@ -10,7 +10,7 @@ auth = HTTPTokenAuth(scheme='Bearer')
def verify_token(token):
try:
with engine.begin() as conn:
- token = conn.execute(sqlalchemy.text('SELECT * FROM accounts WHERE account_name = :account_name'), [{'account_name': token}]).fetchone()
+ token = conn.execute(sqlalchemy.text('SELECT * FROM accounts WHERE api_key = :api_key'), [{'api_key': token}]).fetchone()
return token[0]
except TypeError:
return False \ No newline at end of file