From c593fe14e12affd2830dd89d1cb549b066c13f22 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Mon, 3 Feb 2025 23:23:21 -0800 Subject: [PATCH] make getAPNsFullUrlToUse public and testable --- src/services/NotificationService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/NotificationService.ts b/src/services/NotificationService.ts index 60983ca..9d637f0 100644 --- a/src/services/NotificationService.ts +++ b/src/services/NotificationService.ts @@ -126,13 +126,13 @@ export class NotificationService { return true; } - private getAPNsFullUrlToUse(deviceId: string) { + public static getAPNsFullUrlToUse(deviceId: string) { // Construct the fetch request const devBaseUrl = "https://api.sandbox.push.apple.com" const prodBaseUrl = "https://api.push.apple.com" const path = "/3/device/" + deviceId; - let urlToUse = prodBaseUrl; + let urlToUse = prodBaseUrl + path; if (process.env.NODE_ENV !== "production") { urlToUse = devBaseUrl + path; }