diff --git a/brints-estate-api/src/auth/providers/auth.service.ts b/brints-estate-api/src/auth/providers/auth.service.ts index 7c0ca8e..d558351 100644 --- a/brints-estate-api/src/auth/providers/auth.service.ts +++ b/brints-estate-api/src/auth/providers/auth.service.ts @@ -11,7 +11,7 @@ import { generateVerificationToken, } from 'src/utils/generate-token.lib'; import { VerificationStatus } from 'src/enums/roles.model'; -import { CustomConflictException } from 'src/exceptions/http-exception.filter'; +import { CustomConflictException } from 'src/exceptions/custom.exception'; @Injectable() export class AuthService { diff --git a/brints-estate-api/src/exceptions/custom.exception.ts b/brints-estate-api/src/exceptions/custom.exception.ts new file mode 100644 index 0000000..d096727 --- /dev/null +++ b/brints-estate-api/src/exceptions/custom.exception.ts @@ -0,0 +1,7 @@ +import { HttpException, HttpStatus } from '@nestjs/common'; + +export class CustomConflictException extends HttpException { + constructor(status_code: HttpStatus, message: string) { + super(message, status_code); + } +} diff --git a/brints-estate-api/src/exceptions/http-exception.filter.ts b/brints-estate-api/src/exceptions/http-exception.filter.ts index 69563a5..38925be 100644 --- a/brints-estate-api/src/exceptions/http-exception.filter.ts +++ b/brints-estate-api/src/exceptions/http-exception.filter.ts @@ -3,16 +3,9 @@ import { Catch, ExceptionFilter, HttpException, - HttpStatus, } from '@nestjs/common'; import { Response } from 'express'; -export class CustomConflictException extends HttpException { - constructor(status_code: HttpStatus, message: string) { - super(message, status_code); - } -} - @Catch(HttpException) export class HttpExceptionFilter implements ExceptionFilter { catch(exception: HttpException, host: ArgumentsHost) { diff --git a/brints-estate-api/src/users/dto/create-user.dto.ts b/brints-estate-api/src/users/dto/create-user.dto.ts index 4d3925d..1aa6c2b 100644 --- a/brints-estate-api/src/users/dto/create-user.dto.ts +++ b/brints-estate-api/src/users/dto/create-user.dto.ts @@ -8,7 +8,7 @@ import { MaxLength, MinLength, } from 'class-validator'; -import { UserGender, UserRole } from 'src/enums/roles.model'; +import { UserGender } from 'src/enums/roles.model'; export class CreateUserDto { @ApiProperty() @@ -59,9 +59,4 @@ export class CreateUserDto { @IsNotEmpty() @IsEnum(UserGender) gender: UserGender; - - @ApiProperty() - @IsNotEmpty() - @IsEnum(UserRole) - role: UserRole; }