Skip to content

Commit

Permalink
Updated validation for bing to account for undefined values for categ…
Browse files Browse the repository at this point in the history
…ory field
  • Loading branch information
hpuma committed Mar 13, 2024
1 parent fba9ea6 commit 06895d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bing/api/dto/get-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
IsArray,
ValidateNested,
IsNumber,
ValidateIf,
} from 'class-validator';
import { Type } from 'class-transformer';

Expand Down Expand Up @@ -98,6 +99,7 @@ export class NewsArticle {
about?: any[];

@IsString()
@IsOptional()
category: string;

@IsOptional()
Expand Down

0 comments on commit 06895d4

Please sign in to comment.