From 4c779be572c9af1713e46976c73bfcd2174746f7 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Tue, 30 Dec 2025 22:52:03 +0800 Subject: notif test --- backend/notif.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/notif.py') diff --git a/backend/notif.py b/backend/notif.py index 1dc2b3c..96df3c1 100644 --- a/backend/notif.py +++ b/backend/notif.py @@ -37,7 +37,7 @@ def subscribe(data: PushSubscriptionData): VALUES (?, ?, ?)""", (data.endpoint, data.keys["p256dh"], data.keys["auth"])) conn.commit() - cursor.execute("SELECT * FROM subscriptions"); + cursor.execute("SELECT * FROM subscriptions") result = cursor.fetchall() for row in result: @@ -49,7 +49,7 @@ def subscribe(data: PushSubscriptionData): # --- send notification # ---- not used yet def send_notification(endpoint: str, notification_payload: object): - cursor.execute("SELECT * FROM subscriptions WHERE endpoint = ?", (endpoint,)) + cursor.execute(f"""SELECT * FROM subscriptions WHERE endpoint = \"{endpoint}\"""") row = cursor.fetchall()[0] print(row) -- cgit v1.2.3