|
@ -43,8 +43,9 @@ export class NotificationService { |
|
|
const payload = JSON.stringify(message); |
|
|
const payload = JSON.stringify(message); |
|
|
|
|
|
|
|
|
const encrypted = this.encrypt(subscription.keys.p256dh, subscription.keys.auth, payload); |
|
|
const encrypted = this.encrypt(subscription.keys.p256dh, subscription.keys.auth, payload); |
|
|
|
|
|
const endpoint = subscription.endpoint; |
|
|
|
|
|
|
|
|
const vapidHeaders = await this.vapidService.createVapidAuthHeader(); |
|
|
const vapidHeaders = await this.vapidService.createVapidAuthHeader(endpoint, 12 * 60 * 60, 'mailto:example@example.com'); |
|
|
|
|
|
|
|
|
const parsedUrl = new URL(subscription.endpoint); |
|
|
const parsedUrl = new URL(subscription.endpoint); |
|
|
const options: https.RequestOptions = { |
|
|
const options: https.RequestOptions = { |
|
|