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

fix(medusa): List products by type_id #2427

Merged
merged 5 commits into from
Oct 12, 2022
Merged

Conversation

kasperkristensen
Copy link
Contributor

@kasperkristensen kasperkristensen commented Oct 12, 2022

What

  • Fixes GET /products in both admin and store API so they no longer accept the param type?: string, but instead accept type_id?: string[]

Why

  • Filtering by type would never return any products as ptyp_:id !== ProductType.

Testing

  • Added an integration test for each endpoint.

Closes CORE-695

@kasperkristensen kasperkristensen requested a review from a team as a code owner October 12, 2022 11:19
@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2022

🦋 Changeset detected

Latest commit: 6c3ab57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/medusa Patch

Not sure what this means? Click here to learn what changesets are.

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

@kasperkristensen kasperkristensen changed the title fix: list products by type fix(medusa): list products by type Oct 12, 2022
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

Nice catch! LGTM 💪

@olivermrbl olivermrbl changed the title fix(medusa): list products by type fix(medusa): List products by type_id Oct 12, 2022
@kodiakhq kodiakhq bot merged commit 211720f into develop Oct 12, 2022
@kodiakhq kodiakhq bot deleted the fix/list-products-by-type branch October 12, 2022 18:57
ymaheshwari1 pushed a commit to ymaheshwari1/medusa that referenced this pull request Oct 26, 2022
**What**
- Fixes `GET /products` in both admin and store API so they no longer accept the param `type?: string`, but instead accept `type_id?: string[]`

**Why**
- Filtering by type would never return any products as `ptyp_:id` !== `ProductType`.

**Testing**
- Added an integration test for each endpoint.

Closes CORE-695
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.

None yet

2 participants