mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add test and implementation for addOrUpdate listeners
This commit is contained in:
@@ -66,6 +66,19 @@ export class InMemoryNotificationRepository implements NotificationRepository {
|
||||
}
|
||||
|
||||
this.deviceIdsToDeliverTo[tuple.toString()][deviceId] = secondsThreshold;
|
||||
this.listeners.forEach((listener: Listener) => {
|
||||
const event: NotificationEvent = {
|
||||
event: 'addOrUpdate',
|
||||
notification: {
|
||||
shuttleId,
|
||||
stopId,
|
||||
deviceId,
|
||||
secondsThreshold
|
||||
},
|
||||
}
|
||||
|
||||
listener(event);
|
||||
})
|
||||
}
|
||||
|
||||
async deleteNotificationIfExists({
|
||||
|
||||
Reference in New Issue
Block a user