fix: the email vaerification logic error

This commit is contained in:
mahyargdz
2025-02-26 15:25:18 +03:30
parent f8a1a7b784
commit 93c5ad49d3
320 changed files with 215 additions and 92 deletions
+3 -4
View File
@@ -2,16 +2,15 @@ import { Body, Controller, HttpCode, HttpStatus, Patch, Post, UseGuards } from "
import { ApiOperation, ApiTags } from "@nestjs/swagger";
import { Throttle, ThrottlerGuard } from "@nestjs/throttler";
import { ChangePasswordDto } from "./DTO/change-password.dto";
import { CompleteRegistrationDto } from "./DTO/complete-register.dto";
import { CheckUserExistDto, LoginPasswordDTO } from "./DTO/loginPassword.dto";
import { RequestOtpDto } from "./DTO/request-otp.dto";
import { UpdatePasswordDto } from "./DTO/update-password.dto";
import { VerifyOtpDto } from "./DTO/verify-otp.dto";
import { AuthService } from "./providers/auth.service";
import { AUTH_THROTTLE_LIMIT, AUTH_THROTTLE_TTL } from "../../common/constants";
import { AuthGuards } from "../../common/decorators/auth-guard.decorator";
import { UserDec } from "../../common/decorators/user.decorator";
import { User } from "../users/entities/user.entity";
@ApiTags("Auth")
@Controller("auth")
@@ -80,8 +79,8 @@ export class AuthController {
@ApiOperation({ summary: "Update user password" })
@HttpCode(HttpStatus.OK)
@Patch("change-password")
updatePassword(@UserDec() user: User, @Body() updatePasswordDto: UpdatePasswordDto) {
return this.authService.updatePassword(user.id, updatePasswordDto);
changePassword(@UserDec("id") userId: string, @Body() changePasswordDto: ChangePasswordDto) {
return this.authService.changePassword(userId, changePasswordDto);
}
//***************************** */