import { EntityManager } from "@mikro-orm/postgresql"; import { Injectable, Logger } from "@nestjs/common"; import { BaseNotificationHandler } from "./base-notification.handler"; import { IChangePasswordNotificationData } from "../interfaces/ISendNotificationData"; import { NotificationsService } from "../services/notifications.service"; @Injectable() export class ChangePasswordHandler extends BaseNotificationHandler { protected readonly logger = new Logger(ChangePasswordHandler.name); constructor(private readonly notificationsService: NotificationsService) { super(); } protected async handle(recipientId: string, data: IChangePasswordNotificationData, em: EntityManager): Promise { await this.notificationsService.changePasswordNotification(recipientId, data, em); } protected getHandlerName(): string { return "ChangePassword"; } }