mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
implement method in NotificationService
This commit is contained in:
@@ -256,6 +256,22 @@ export class NotificationService {
|
||||
* @param deviceId
|
||||
*/
|
||||
public async getAllScheduledNotificationsForDevice(deviceId: string): Promise<ScheduledNotificationData[]> {
|
||||
return [];
|
||||
const scheduledNotifications: ScheduledNotificationData[] = [];
|
||||
|
||||
for (const key of Object.keys(this.deviceIdsToDeliverTo)) {
|
||||
if (this.deviceIdsToDeliverTo[key].has(deviceId)) {
|
||||
const tupleKey = TupleKey.fromExistingStringKey(key);
|
||||
const shuttleId = tupleKey.tuple[0]
|
||||
const stopId = tupleKey.tuple[1];
|
||||
|
||||
scheduledNotifications.push({
|
||||
shuttleId,
|
||||
stopId,
|
||||
deviceId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return scheduledNotifications;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user