summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-12-29 20:43:08 +0800
committeraltaf-creator <dev@altafcreator.com>2025-12-29 20:43:08 +0800
commit45453fa684334904b5a4c1d108c517106768be1e (patch)
treec1b9acad21eb86b8d30ccc034b7e6d73b3e97b81 /backend
parentf50f545ca14918ab288c5a42578c1f484a9ce643 (diff)
man who cares about expirationTime
Diffstat (limited to 'backend')
-rw-r--r--backend/notif.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/backend/notif.py b/backend/notif.py
index 92fe777..db7e0d3 100644
--- a/backend/notif.py
+++ b/backend/notif.py
@@ -19,7 +19,6 @@ f.close()
cursor.execute("""
CREATE TABLE IF NOT EXISTS subscriptions (
endpoint TEXT PRIMARY KEY,
- expiration_time REAL,
keys_p256dh TEXT NOT NULL,
keys_auth TEXT NOT NULL
);""")
@@ -27,15 +26,9 @@ CREATE TABLE IF NOT EXISTS subscriptions (
# --- subscribe
def subscribe(data: PushSubscriptionData):
- if data.expirationTime:
- print("data.expirationTime exists", data.expirationTime)
- cursor.execute("""
- INSERT INTO subscriptions (endpoint, expiration_time, keys_p256dh, keys_auth)
- VALUES (?, ?, ?, ?)""", (data.endpoint, data.expirationTime, data.keys["p256dh"], data.keys["auth"]))
- else:
- cursor.execute("""
- INSERT INTO subscriptions (endpoint, keys_p256dh, keys_auth)
- VALUES (?, ?, ?, ?)""", (data.endpoint, data.keys["p256dh"], data.keys["auth"]))
+ cursor.execute("""
+ INSERT INTO subscriptions (endpoint, keys_p256dh, keys_auth)
+ VALUES (?, ?, ?, ?)""", (data.endpoint, data.keys["p256dh"], data.keys["auth"]))
conn.commit()
return data.endpoint