From 45453fa684334904b5a4c1d108c517106768be1e Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Mon, 29 Dec 2025 20:43:08 +0800 Subject: man who cares about expirationTime --- backend/notif.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'backend') 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 -- cgit v1.2.3