From 58bb8a1c32e521085388d74d5fa5c0f7379644be Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 19 Feb 2025 11:15:11 -0800 Subject: [PATCH] change flag to integration-testing and update notification service construction --- src/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index eb4ed7d..3cf1915 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,16 +21,17 @@ async function main() { }); const repository = new UnoptimizedInMemoryRepository(); - if (process.argv.length > 2 && process.argv[2] == "mocks") { + let notificationService: NotificationService; + if (process.argv.length > 2 && process.argv[2] == "integration-testing") { await loadTestData(repository); + notificationService = new NotificationService(repository, false); } else { const repositoryDataUpdater = new TimedApiBasedRepositoryLoader( repository ); await repositoryDataUpdater.start(); + notificationService = new NotificationService(repository); } - - const notificationService = new NotificationService(repository); notificationService.reloadAPNsTokenIfTimePassed(); const { url } = await startStandaloneServer(server, {