mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename token variable for clarity
This commit is contained in:
@@ -12,7 +12,7 @@ interface ScheduledNotificationData {
|
||||
}
|
||||
|
||||
export class NotificationService {
|
||||
private token: string | undefined = undefined;
|
||||
private apnsToken: string | undefined = undefined;
|
||||
|
||||
private _lastRefreshedTimeMs: number | undefined = undefined;
|
||||
get lastRefreshedTimeMs() {
|
||||
@@ -53,7 +53,7 @@ export class NotificationService {
|
||||
"iat": now,
|
||||
};
|
||||
|
||||
this.token = jwt.sign(claimsPayload, privateKey, {
|
||||
this.apnsToken = jwt.sign(claimsPayload, privateKey, {
|
||||
algorithm: "ES256",
|
||||
header: tokenHeader
|
||||
});
|
||||
@@ -66,6 +66,8 @@ export class NotificationService {
|
||||
}
|
||||
|
||||
private async sendEtaNotificationImmediately({ deviceId, shuttleId, stopId }: ScheduledNotificationData): Promise<boolean> {
|
||||
this.reloadAPNsTokenIfTimePassed();
|
||||
|
||||
// Construct the fetch request
|
||||
|
||||
// Send the fetch request
|
||||
|
||||
Reference in New Issue
Block a user