Skip to content

Commit

Permalink
feat: parsing exec ed start and end date from addtional metadata (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sheehan-edx authored Jan 3, 2023
1 parent 9259b69 commit 12368a6
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 @@ -158,6 +158,10 @@ const searchResultsExecEd = {
upgrade_deadline: 1892678399,
pacing_type: 'self_paced',
},
additional_metadata: {
start_date: '2020-01-24T05:00:00Z',
end_date: '2080-01-01T17:00:00Z',
},
},
],
page: 1,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/algoliaUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ function mapAlgoliaObjectToExecEd(algoliaCourseObject, intl, messages) {
full_description: courseDescription,
original_image_url: bannerImageUrl,
marketing_url: marketingUrl,
advertised_course_run: courseRun,
upcoming_course_runs: upcomingRuns,
skill_names: skillNames,
additional_metadata: additionalMetadata,
} = algoliaCourseObject;
const { start: startDate, end: endDate } = courseRun;
const { start_date: startDate, end_date: endDate } = additionalMetadata;
const priceText = coursePrice != null
? `$${coursePrice[0].price.toString()}`
: intl.formatMessage(
Expand Down

0 comments on commit 12368a6

Please sign in to comment.