Skip to content

Commit

Permalink
optional properties
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm committed Dec 27, 2024
1 parent 8514bed commit 12f6816
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/models/generated/schemas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ export interface MediaSource {
*/
pages?: number;
};
properties: {
properties?: {
/**
* The unique identifier of the property.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/models/generated/schemasPublic.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export interface MediaSource {
*/
pages?: number;
};
properties: {
properties?: {
/**
* The unique identifier of the property.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/schema/schemas/MediaSource.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@
}
}
},
"required": ["uid", "type", "name", "languageCodes", "totals", "properties"]
"required": ["uid", "type", "name", "languageCodes", "totals"]
}
2 changes: 1 addition & 1 deletion src/schema/schemasPublic/MediaSource.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@
}
}
},
"required": ["uid", "type", "name", "languageCodes", "totals", "properties"]
"required": ["uid", "type", "name", "languageCodes", "totals"]
}
2 changes: 1 addition & 1 deletion src/services/newspapers/newspapers.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const mediaSourceToNewspaper = (mediaSource: MediaSource): NewspaperInternal =>
included: true,
labels: [],
languages: mediaSource.languageCodes,
properties: mediaSource.properties.map(p => ({ label: p.label ?? '', value: p.value, name: p.id })),
properties: mediaSource.properties?.map(p => ({ label: p.label ?? '', value: p.value, name: p.id })),
} satisfies NewspaperInternal
}

Expand Down

0 comments on commit 12f6816

Please sign in to comment.