diff --git a/src/auth/dtos/response/user.response.dto.ts b/src/auth/dtos/response/user.response.dto.ts index 1c2c50f..82fbeab 100644 --- a/src/auth/dtos/response/user.response.dto.ts +++ b/src/auth/dtos/response/user.response.dto.ts @@ -1,4 +1,5 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; +import { Gender } from '~/customer/enums'; import { DocumentMetaResponseDto } from '~/document/dtos/response'; import { User } from '~/user/entities'; @@ -33,6 +34,10 @@ export class UserResponseDto { @ApiProperty() isEmailVerified!: boolean; + @ApiPropertyOptional({ enum: Gender, nullable: true }) + gender!: Gender | null; + + constructor(user: User) { this.id = user.id; this.countryCode = user.countryCode; @@ -44,5 +49,6 @@ export class UserResponseDto { this.profilePicture = user.profilePicture ? new DocumentMetaResponseDto(user.profilePicture) : null; this.isEmailVerified = user.isEmailVerified; this.isPhoneVerified = user.isPhoneVerified; + this.gender = (user.customer?.gender as Gender) || null; } }