fix: join address to the customer get by admin

This commit is contained in:
mahyargdz
2025-03-06 10:35:12 +03:30
parent b92a65c22c
commit 144bfb2ac1
12 changed files with 257 additions and 75 deletions
+17
View File
@@ -5,6 +5,7 @@ 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 { RefreshTokenDto } from "./DTO/refresh-token.dto";
import { RequestOtpDto } from "./DTO/request-otp.dto";
import { VerifyOtpDto } from "./DTO/verify-otp.dto";
import { AuthService } from "./providers/auth.service";
@@ -82,6 +83,22 @@ export class AuthController {
changePassword(@UserDec("id") userId: string, @Body() changePasswordDto: ChangePasswordDto) {
return this.authService.changePassword(userId, changePasswordDto);
}
@AuthGuards()
@ApiOperation({ summary: "refresh the user access token / refresh token" })
@HttpCode(HttpStatus.OK)
@Post("refresh")
refresh(@Body() refreshTokenDto: RefreshTokenDto) {
return this.authService.refreshToken(refreshTokenDto.refreshToken);
}
@AuthGuards()
@ApiOperation({ summary: "logout the user" })
@HttpCode(HttpStatus.OK)
@Post("logout")
logout(@Body() refreshTokenDto: RefreshTokenDto) {
return this.authService.logout(refreshTokenDto.refreshToken);
}
//***************************** */
// @Post("forgot-password")