mirror of
https://github.com/xtr-dev/payload-notifications.git
synced 2025-12-12 20:03:23 +00:00
Refactor: Simplify notifications plugin configuration, remove unused code, and improve channel handling
This commit is contained in:
@@ -11,7 +11,7 @@ export function createPushNotificationEndpoints(options: NotificationsPluginOpti
|
||||
}
|
||||
|
||||
const webPushConfig = options.webPush
|
||||
|
||||
|
||||
return [
|
||||
// Subscribe endpoint
|
||||
{
|
||||
@@ -35,7 +35,6 @@ export function createPushNotificationEndpoints(options: NotificationsPluginOpti
|
||||
}
|
||||
|
||||
const pushManager = new WebPushManager(webPushConfig, req.payload)
|
||||
|
||||
await pushManager.subscribe(
|
||||
String(req.user.id),
|
||||
subscription,
|
||||
@@ -247,4 +246,4 @@ export function createPushNotificationEndpoints(options: NotificationsPluginOpti
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user