mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
fix binding errors with static method
This commit is contained in:
2
src/services/NotificationService.test.ts
Normal file
2
src/services/NotificationService.test.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { NotificationService } from './NotificationService';
|
||||
|
||||
@@ -25,7 +25,6 @@ export class NotificationService {
|
||||
this.reloadAPNsTokenIfTimePassed = this.reloadAPNsTokenIfTimePassed.bind(this);
|
||||
this.lastReloadedTimeForAPNsIsTooRecent = this.lastReloadedTimeForAPNsIsTooRecent.bind(this);
|
||||
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
|
||||
this.getAPNsFullUrlToUse = this.getAPNsFullUrlToUse.bind(this);
|
||||
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
||||
this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this);
|
||||
this.scheduleNotification = this.scheduleNotification.bind(this);
|
||||
@@ -75,7 +74,7 @@ export class NotificationService {
|
||||
|
||||
private async sendEtaNotificationImmediately({ deviceId, shuttleId, stopId }: ScheduledNotificationData): Promise<boolean> {
|
||||
this.reloadAPNsTokenIfTimePassed();
|
||||
const url = this.getAPNsFullUrlToUse(deviceId);
|
||||
const url = NotificationService.getAPNsFullUrlToUse(deviceId);
|
||||
|
||||
const shuttle = await this.repository.getShuttleById(shuttleId);
|
||||
const stop = await this.repository.getStopById(stopId);
|
||||
|
||||
Reference in New Issue
Block a user