Look up by user and not the ever changing encrypted token, whoops!
This commit is contained in:
parent
54d47e7e46
commit
3e3bd243bd
2
main.py
2
main.py
@ -82,7 +82,7 @@ def register_token(
|
|||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
cursor.execute(
|
cursor.execute(
|
||||||
"SELECT * FROM device_tokens WHERE user_id=%s AND hashed_token=%s",
|
"SELECT * FROM device_tokens WHERE user_id=%s AND hashed_token=%s",
|
||||||
(secure_token,hashed_token))
|
(user_id,hashed_token))
|
||||||
existing = cursor.fetchone()
|
existing = cursor.fetchone()
|
||||||
|
|
||||||
if existing:
|
if existing:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user