Look up by user and not the ever changing encrypted token, whoops!

This commit is contained in:
Florian 2025-10-03 18:55:33 +02:00
parent 54d47e7e46
commit 3e3bd243bd

View File

@ -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: