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

feat: Line Items API Routes #6478

Merged
merged 4 commits into from
Feb 27, 2024
Merged

feat: Line Items API Routes #6478

merged 4 commits into from
Feb 27, 2024

Conversation

olivermrbl
Copy link
Contributor

What

  • POST /store/carts/:id/line-items
  • POST /store/carts/:id/line-items/:id
  • DELETE /store/carts/:id/line-items/:id

Outstanding

  • Integration tests
  • Module integrations: Payment, Fulfillment, Promotions

Depends on #6475 and #6449.

Copy link

changeset-bot bot commented Feb 22, 2024

⚠️ No Changeset found

Latest commit: be136a3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 0:17am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Feb 27, 2024 0:17am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 0:17am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 0:17am

@olivermrbl olivermrbl changed the base branch from feat/create-cart-with-items to develop February 26, 2024 15:07
Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥 one todo around the deletion and few comments

Comment on lines +17 to +20
const cart = await cartModuleService.retrieve(req.params.id, {
select: ["id", "region_id", "currency_code"],
relations: ["region", "items", "items.variant_id"],
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: should we use the remote query here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to use the module service directly, as I don't need any other resources than what it internal to the cart module. Any specific reason you want to use the remote query?

packages/types/src/cart/common.ts Show resolved Hide resolved
packages/types/src/cart/workflows.ts Show resolved Hide resolved
@kodiakhq kodiakhq bot merged commit 3ee0f59 into develop Feb 27, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants