Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to the backend to support the frontend #183

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

jkachel
Copy link
Collaborator

@jkachel jkachel commented Dec 11, 2024

What are the relevant tickets?

https://github.com/mitodl/hq/issues/5656

Description (What does it do?)

Changes some stuff to make things work better for the frontend code:

  • Expose the CSRF settings so we can set them
  • Fixes the API spec for the add discount API to add in the discount code parameter (wasn't there before)
  • Exposes the start_checkout API to the OpenAPI spec
  • Include discount information with basket items
  • Reworks the start_checkout API to be a view function so it's easier to route and generate docs for
  • Regenerate the OpenAPI specs/clients

How can this be tested?

Tests should pass. You should see the start checkout API in Swagger, you should be able to see the discount code property the add discount API, and baskets should include discount information if there is any for the items within.

This branch is necessary to make this PR in the frontend repo work, so you can test by checking that out and then using the frontend.

…ents app API

- The basket/add_discount API didn't have the discount code option visible in the schema; fixed
- Added the start_checkout to the API spec (as best I could I think)
- Updated basket item serializer to include the applied discount information
- Regenerate the spec
@jkachel jkachel added the Needs Review An open Pull Request that is ready for review label Dec 11, 2024
@cp-at-mit cp-at-mit self-assigned this Dec 12, 2024
@cp-at-mit cp-at-mit removed the Needs Review An open Pull Request that is ready for review label Dec 13, 2024
@jkachel jkachel merged commit 8b9b4c9 into main Dec 13, 2024
6 checks passed
@jkachel jkachel deleted the jkachel/5656-backend-changes-for-frontend-pt3 branch December 13, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants