refactor: migrate enrollment API calls from v1 to v2#1938
refactor: migrate enrollment API calls from v1 to v2#1938taimoor-ahmed-1 wants to merge 1 commit into
Conversation
Migrates both enrollment call sites from /api/enrollment/v1/enrollment to /api/enrollment/v2/enrollment/ (trailing slash required by the v2 DRF DefaultRouter): - course-exit/data/api.js GET (list enrollments for recommendations) - alerts/enrollment-alert/data/api.js POST (enroll from outline alert) Test URL assertions updated accordingly in CourseExit.test.jsx and OutlineTab.test.jsx. Part of the FC-0118 API standardization (openedx/edx-platform). Closes openedx#1936 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Thanks for the pull request, @taimoor-ahmed-1! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1938 +/- ##
=======================================
Coverage 91.41% 91.41%
=======================================
Files 347 347
Lines 5777 5777
Branches 1351 1385 +34
=======================================
Hits 5281 5281
Misses 477 477
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Migrates both enrollment API call sites in Learning from
/api/enrollment/v1/enrollmentto/api/enrollment/v2/enrollment/, per the FC-0118 API standardization onopenedx/edx-platform.src/courseware/course/course-exit/data/api.jssrc/alerts/enrollment-alert/data/api.jsThe trailing slash on
/enrollment/is required: the v2 endpoint is served by a DRFDefaultRouter, and the POST caller would otherwise fail (Django won't redirect a POST across the missing slash).Test URL assertions updated in
CourseExit.test.jsxandOutlineTab.test.jsx.Dependency
openedx/edx-platformPR #38724). Must be released before this is deployed.Test plan
npm test—CourseExit.test.jsxandOutlineTab.test.jsxpass with updated URL assertionsCloses #1936
🤖 Generated with Claude Code