chore: fix the send email problem

This commit is contained in:
Mahyargdz
2025-05-14 14:59:58 +03:30
parent 9bd662f872
commit 22ba9e52dc
6 changed files with 169 additions and 111 deletions
+4 -4
View File
@@ -10,7 +10,6 @@ import { AdminsService } from "../../users/providers/admins.service";
import { UsersService } from "../../users/providers/users.service";
import { OTPService } from "../../utils/providers/otp.service";
import { PasswordService } from "../../utils/providers/password.service";
import { SmsService } from "../../utils/providers/sms.service";
import { ChangePasswordDto } from "../DTO/change-password.dto";
import { CompleteRegistrationDto } from "../DTO/complete-register.dto";
import { CheckUserExistDto, LoginPasswordDTO } from "../DTO/loginPassword.dto";
@@ -26,7 +25,6 @@ export class AuthService {
private readonly tokensService: TokensService,
private readonly dataSource: DataSource,
private readonly notificationQueue: NotificationQueue,
private readonly smsService: SmsService,
private readonly referralsService: ReferralsService,
) {}
//****************** */
@@ -45,7 +43,8 @@ export class AuthService {
}
const otpCode = await this.otpService.generateAndSetInCache(phone, "REGISTER");
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
// await this.smsService.sendSmsVerifyCode(phone, otpCode);
await this.notificationQueue.addLoginOtpNotification({ phone, code: otpCode });
return {
message: AuthMessage.OTP_SENT,
@@ -169,7 +168,8 @@ export class AuthService {
const otpCode = await this.otpService.generateAndSetInCache(phone, "LOGIN");
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
// await this.smsService.sendSmsVerifyCode(phone, otpCode);
await this.notificationQueue.addLoginOtpNotification({ phone, code: otpCode });
return {
message: AuthMessage.OTP_SENT,