fix: bug in the sliders and blog module

This commit is contained in:
mahyargdz
2025-04-13 10:30:59 +03:30
parent cac2620fc6
commit 78f481871c
14 changed files with 219 additions and 10 deletions
+1 -6
View File
@@ -1,4 +1,4 @@
import { BadRequestException, Injectable, Logger } from "@nestjs/common";
import { BadRequestException, Injectable } from "@nestjs/common";
import { DataSource } from "typeorm";
import { TokensService } from "./tokens.service";
@@ -17,7 +17,6 @@ import { VerifyOtpDto } from "../DTO/verify-otp.dto";
@Injectable()
export class AuthService {
private readonly logger = new Logger(AuthService.name);
constructor(
private readonly usersService: UsersService,
private readonly passwordService: PasswordService,
@@ -44,11 +43,9 @@ export class AuthService {
const otpCode = await this.otpService.generateAndSetInCache(phone, "REGISTER");
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
this.logger.debug(`OTP sent to ${phone}: ${otpCode}`);
return {
message: AuthMessage.OTP_SENT,
otpCode,
};
}
//****************** */
@@ -154,11 +151,9 @@ export class AuthService {
const otpCode = await this.otpService.generateAndSetInCache(phone, "LOGIN");
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
this.logger.debug(`OTP sent to ${phone}: ${otpCode}`);
return {
message: AuthMessage.OTP_SENT,
otpCode,
};
}