summaryrefslogtreecommitdiff
path: root/backend/notif.py
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-12-30 22:52:03 +0800
committeraltaf-creator <dev@altafcreator.com>2025-12-30 22:52:03 +0800
commit4c779be572c9af1713e46976c73bfcd2174746f7 (patch)
treef033e60c7ca9ccf3fdb819f412fc774a5e3bf803 /backend/notif.py
parent9ebad91a84a907c8135b0c57645cb9ae8907a7de (diff)
notif test
Diffstat (limited to 'backend/notif.py')
-rw-r--r--backend/notif.py4
1 files changed, 2 insertions, 2 deletions
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)