chore: add new service to add subs to danak services in array

This commit is contained in:
mahyargdz
2025-02-13 13:27:21 +03:30
parent 95b9c38031
commit caa968ab4a
24 changed files with 317 additions and 98 deletions
+6 -2
View File
@@ -8,6 +8,7 @@ import { RoleEnum } from "../../users/enums/role.enum";
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 { CompleteRegistrationDto } from "../DTO/complete-register.dto";
import { CheckUserExistDto, LoginPasswordDTO } from "../DTO/loginPassword.dto";
import { RequestOtpDto } from "../DTO/request-otp.dto";
@@ -24,6 +25,7 @@ export class AuthService {
private readonly tokensService: TokensService,
private readonly dataSource: DataSource,
private readonly notificationService: NotificationsService,
private readonly smsService: SmsService,
) {}
//****************** */
//****************** */
@@ -40,7 +42,8 @@ export class AuthService {
};
}
const otpCode = await this.otpService.generateAndSetInCache(phone, "REGISTER");
// await SmsService.sendOtp(phone, otpCode);
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
this.logger.debug(`OTP sent to ${phone}: ${otpCode}`);
return {
@@ -142,7 +145,8 @@ export class AuthService {
}
const otpCode = await this.otpService.generateAndSetInCache(phone, "LOGIN");
// await SmsService.sendOtp(phone, otpCode);
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
this.logger.debug(`OTP sent to ${phone}: ${otpCode}`);
return {