A simple to-do app focused on tasks that can be completed within a specific time span.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

exists check update

+5 -1
+5 -1
server/utils/db/subscription.ts
··· 24 24 const storage = useStorage(); 25 25 const subscriptions = await Subscriptions.getAll(userId); 26 26 27 - const exists = subscriptions.find(s => s.endpoint === subscription.endpoint); 27 + const exists = subscriptions.find((s) => 28 + s.endpoint === subscription.endpoint || 29 + (s.keys.p256dh === subscription.keys.p256dh && 30 + s.keys.auth === subscription.keys.auth) 31 + ); 28 32 29 33 if (!exists) { 30 34 subscriptions.push(subscription);