implement cancelNotification

This commit is contained in:
2025-02-04 11:42:02 -08:00
parent 4c4bd0fc4a
commit d3c824be68

View File

@@ -29,11 +29,19 @@ export const MutationResolvers: Resolvers<ServerContext> = {
return response; return response;
}, },
cancelNotification: async (_parent, args, context, _info) => { cancelNotification: async (_parent, args, context, _info) => {
const response: NotificationResponse = { if (context.notificationService.isNotificationScheduled(args.input)) {
message: "Not implemented", await context.notificationService.cancelNotificationIfExists(args.input);
success: false return {
success: true,
message: "Notification cancelled",
data: args.input,
}
}
return {
success: false,
message: "Notification doesn't exist"
} }
return response;
}, },
}, },
} }