mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
add method to check if notification is scheduled
This commit is contained in:
@@ -42,6 +42,10 @@ export class InMemoryNotificationRepository implements NotificationRepository {
|
||||
return this.deviceIdsToDeliverTo[tuple.toString()][deviceId];
|
||||
}
|
||||
|
||||
async isNotificationScheduled(lookupArguments: NotificationLookupArguments): Promise<boolean> {
|
||||
return await this.getSecondsThresholdForNotificationIfExists(lookupArguments) !== null;
|
||||
}
|
||||
|
||||
async addOrUpdateNotification({
|
||||
shuttleId,
|
||||
stopId,
|
||||
@@ -71,4 +75,5 @@ export class InMemoryNotificationRepository implements NotificationRepository {
|
||||
|
||||
delete this.deviceIdsToDeliverTo[tupleKey.toString()][deviceId];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user