chore: notif service

This commit is contained in:
mahyargdz
2025-06-07 00:10:02 +03:30
parent dba7cec544
commit f4ce67c00c
3 changed files with 19 additions and 33 deletions
@@ -194,12 +194,7 @@ export class NotificationsService {
queryRunner,
);
if (isActive) {
await this.smsService.sendWalletChargeSms(
data.userPhone,
numberFormat(data.amount),
numberFormat(data.balance),
dateFormat(data.date),
);
await this.smsService.sendWalletChargeSms(data.userPhone, data.amount, data.balance, dateFormat(data.date));
if (data.userEmail) await this.emailService.sendWalletEmail(data);
}
return this.createNotification(
@@ -219,13 +214,7 @@ export class NotificationsService {
queryRunner,
);
if (isActive) {
await this.smsService.sendWalletDeductionSms(
data.userPhone,
numberFormat(data.amount),
numberFormat(data.balance),
data.reason,
dateFormat(data.date),
);
await this.smsService.sendWalletDeductionSms(data.userPhone, data.amount, data.balance, data.reason, dateFormat(data.date));
if (data.userEmail) await this.emailService.sendWalletEmail(data);
}
return this.createNotification(
@@ -409,7 +398,7 @@ export class NotificationsService {
);
if (isActive) {
await this.smsService.sendPaymentReminderSms(data.userPhone, numberFormat(data.amount));
await this.smsService.sendPaymentReminderSms(data.userPhone, data.amount);
if (data.userEmail) await this.emailService.sendPaymentReminderEmail(data);
}
@@ -435,7 +424,7 @@ export class NotificationsService {
);
if (isActive) {
await this.smsService.sendPaymentCancellationSms(data.userPhone, numberFormat(data.amount));
await this.smsService.sendPaymentCancellationSms(data.userPhone, data.amount);
if (data.userEmail) await this.emailService.sendPaymentCancellationEmail(data);
}