Skip to content

Commit

Permalink
fix: make referralOpportunity optional (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludtkemorgan authored Nov 13, 2023
1 parent 1571462 commit ac7dd11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ValidateNested,
IsBoolean,
IsPhoneNumber,
IsOptional,
} from "class-validator"
import { ValidationsGroupsEnum } from "../../shared/types/validations-groups-enum"
import { OmitType } from "@nestjs/swagger"
Expand Down Expand Up @@ -102,7 +103,8 @@ export class ListingPublishedCreateDto extends OmitType(ListingCreateDto, [

@Expose()
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
referralOpportunity: boolean
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
referralOpportunity?: boolean

@Expose()
@IsString({ groups: [ValidationsGroupsEnum.default] })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ValidateNested,
IsBoolean,
IsPhoneNumber,
IsOptional,
} from "class-validator"
import { ValidationsGroupsEnum } from "../../shared/types/validations-groups-enum"
import { ListingUpdateDto } from "./listing-update.dto"
Expand Down Expand Up @@ -102,7 +103,8 @@ export class ListingPublishedUpdateDto extends OmitType(ListingUpdateDto, [

@Expose()
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
referralOpportunity: boolean
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
referralOpportunity?: boolean

@Expose()
@IsString({ groups: [ValidationsGroupsEnum.default] })
Expand Down

0 comments on commit ac7dd11

Please sign in to comment.