mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
move shouldSendNotifications property to the AppleNotificationSender
This commit is contained in:
@@ -8,6 +8,7 @@ import { TimedApiBasedRepositoryLoader } from "./loaders/TimedApiBasedRepository
|
||||
import { ETANotificationScheduler } from "./notifications/schedulers/ETANotificationScheduler";
|
||||
import { configDotenv } from "dotenv";
|
||||
import { loadTestData } from "./loaders/loadTestData";
|
||||
import { AppleNotificationSender } from "./notifications/senders/AppleNotificationSender";
|
||||
|
||||
configDotenv();
|
||||
|
||||
@@ -24,7 +25,8 @@ async function main() {
|
||||
let notificationService: ETANotificationScheduler;
|
||||
if (process.argv.length > 2 && process.argv[2] == "integration-testing") {
|
||||
await loadTestData(repository);
|
||||
notificationService = new ETANotificationScheduler(repository, false);
|
||||
const appleNotificationSender = new AppleNotificationSender(false);
|
||||
notificationService = new ETANotificationScheduler(repository, appleNotificationSender);
|
||||
} else {
|
||||
const repositoryDataUpdater = new TimedApiBasedRepositoryLoader(
|
||||
repository
|
||||
@@ -32,7 +34,6 @@ async function main() {
|
||||
await repositoryDataUpdater.start();
|
||||
notificationService = new ETANotificationScheduler(repository);
|
||||
}
|
||||
notificationService.reloadAPNsTokenIfTimePassed();
|
||||
|
||||
const { url } = await startStandaloneServer(server, {
|
||||
listen: {
|
||||
|
||||
Reference in New Issue
Block a user