update: remove the auth guard from the feedback route

This commit is contained in:
mahyargdz
2025-08-20 09:26:43 +03:30
parent aa487809ee
commit 7b6b79dfa8
6 changed files with 41 additions and 12 deletions
+5 -7
View File
@@ -1,25 +1,23 @@
import { Body, Controller, HttpCode, HttpStatus, Patch, Post, UseGuards } from "@nestjs/common";
import { Body, Controller, HttpCode, HttpStatus, Patch, Post } from "@nestjs/common";
import { ApiOperation, ApiTags } from "@nestjs/swagger";
import { Throttle, ThrottlerGuard } from "@nestjs/throttler";
import { ChangePasswordDto } from "./DTO/change-password.dto";
import { CheckUserExistDto, LoginPasswordDTO } from "./DTO/loginPassword.dto";
import { RefreshTokenDto } from "./DTO/refresh-token.dto";
import { RequestOtpDto } from "./DTO/request-otp.dto";
import { SSOTokenRequestDTO } from "./DTO/requests/sso-token-request.dto";
import { SSOTokenValidateDTO } from "./DTO/requests/sso-token-validate.dto";
import { VerifyOtpDto } from "./DTO/verify-otp.dto";
import { AuthService } from "./providers/auth.service";
import { SSOService } from "./providers/sso.service";
import { AUTH_THROTTLE_LIMIT, AUTH_THROTTLE_TTL, AUTH__REFRESH_THROTTLE_LIMIT, AUTH__REFRESH_THROTTLE_TTL } from "../../common/constants";
import { SSOTokenValidateDTO } from "./DTO/requests/sso-token-validate.dto";
import { AuthGuards } from "../../common/decorators/auth-guard.decorator";
import { RefreshTokenRateLimit, StrictRateLimit } from "../../common/decorators/rate-limit.decorator";
import { UserDec } from "../../common/decorators/user.decorator";
import { User } from "../users/entities/user.entity";
@ApiTags("Auth")
@Controller("auth")
@Throttle({ default: { limit: AUTH_THROTTLE_LIMIT, ttl: AUTH_THROTTLE_TTL } })
@UseGuards(ThrottlerGuard)
@StrictRateLimit()
export class AuthController {
constructor(
private readonly authService: AuthService,
@@ -77,7 +75,7 @@ export class AuthController {
return this.authService.changePassword(userId, changePasswordDto);
}
@Throttle({ default: { limit: AUTH__REFRESH_THROTTLE_LIMIT, ttl: AUTH__REFRESH_THROTTLE_TTL } })
@RefreshTokenRateLimit()
@ApiOperation({ summary: "refresh the user access token / refresh token" })
@HttpCode(HttpStatus.OK)
@Post("refresh")