Skip to content

Commit

Permalink
Change 'content' field to 'url' in corrections object [elifesciences/…
Browse files Browse the repository at this point in the history
  • Loading branch information
nlisgo committed Jul 6, 2024
1 parent 2978071 commit c1f3cd8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/types/enhanced-article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export type ExternalVersionSummary = {
url: string,
corrections?: {
date: Date,
content: string,
url: string,
}[]
};

Expand Down
2 changes: 1 addition & 1 deletion src/utils/generators/generate-timeline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('generateTimeline', () => {
corrections: [
{
date: new Date('2023-02-10'),
content: 'https://doi.org/doi-123v3',
url: 'https://doi.org/doi-123v3',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/generators/generate-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const generateTimeline = (version: EnhancedArticleWithVersions): Serialis
events.push(
{
name: i18n.t(`${isExternalVersionSummary(current) ? 'external_' : ''}timeline_version_title`),
url: correction.content,
url: correction.url,
version: +current.versionIdentifier,
date: new Date(correction.date).toDateString(),
},
Expand Down
2 changes: 1 addition & 1 deletion wiremock/files/preprints/85111v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -9365,7 +9365,7 @@
"url": "https://elifesciences.org/articles/85111v1",
"corrections": [
{
"content": "https://elifesciences.org/articles/85111v2",
"url": "https://elifesciences.org/articles/85111v2",
"date": "2024-07-01T00:00:00.000Z"
}
]
Expand Down
2 changes: 1 addition & 1 deletion wiremock/files/preprints/85111v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10105,7 +10105,7 @@
"url": "https://elifesciences.org/articles/85111v1",
"corrections": [
{
"content": "https://elifesciences.org/articles/85111v2",
"url": "https://elifesciences.org/articles/85111v2",
"date": "2024-07-01T00:00:00.000Z"
}
]
Expand Down

0 comments on commit c1f3cd8

Please sign in to comment.