Files
Checkmate/server/src/worker/reactors/reactor.notification.ts
T
2026-09-24 13:43:40 -07:00

13 lines
591 B
TypeScript

import { INotificationsService } from "@/domain/notifications/notification.service.js";
import { IMonitorReactor } from "@/worker/reactors/reactor.interface.js";
import { MonitorEvaluation } from "@/worker/worker.interface.js";
export class NotificationReactor implements IMonitorReactor {
readonly name = "notification";
readonly blocking = false;
constructor(private notificationService: INotificationsService) {}
react = async (evaluation: MonitorEvaluation) => {
await this.notificationService.handleNotifications(evaluation.monitor, evaluation.check, evaluation.decision);
};
}