update server context to only include the notification repository

This commit is contained in:
2025-03-27 10:42:43 -07:00
parent bda46d6808
commit 3761f43909
7 changed files with 32 additions and 22 deletions

View File

@@ -30,7 +30,7 @@ export const MutationResolvers: Resolvers<ServerContext> = {
: ETANotificationScheduler.defaultSecondsThresholdForNotificationToFire,
}
await context.notificationService.scheduleNotification(notificationData);
await context.notificationRepository.scheduleNotification(notificationData);
const response: NotificationResponse = {
message: "Notification scheduled",
@@ -40,8 +40,8 @@ export const MutationResolvers: Resolvers<ServerContext> = {
return response;
},
cancelNotification: async (_parent, args, context, _info) => {
if (context.notificationService.isNotificationScheduled(args.input)) {
await context.notificationService.cancelNotificationIfExists(args.input);
if (context.notificationRepository.isNotificationScheduled(args.input)) {
await context.notificationRepository.cancelNotificationIfExists(args.input);
return {
success: true,
message: "Notification cancelled",