mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename method to define what happens if notification doesn't exist
This commit is contained in:
@@ -197,7 +197,7 @@ export class NotificationService {
|
|||||||
* @param shuttleId Shuttle ID of the ETA object.
|
* @param shuttleId Shuttle ID of the ETA object.
|
||||||
* @param stopId Stop ID of the ETA object.
|
* @param stopId Stop ID of the ETA object.
|
||||||
*/
|
*/
|
||||||
public async cancelNotification({ deviceId, shuttleId, stopId }: ScheduledNotificationData) {
|
public async cancelNotificationIfExists({ deviceId, shuttleId, stopId }: ScheduledNotificationData) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ describe("NotificationService", () => {
|
|||||||
await notificationService.scheduleNotification(notificationData1);
|
await notificationService.scheduleNotification(notificationData1);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await notificationService.cancelNotification(notificationData1);
|
await notificationService.cancelNotificationIfExists(notificationData1);
|
||||||
await repository.addOrUpdateEta(eta);
|
await repository.addOrUpdateEta(eta);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
|
|||||||
Reference in New Issue
Block a user