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: Switch to zod for customer endpoints, fix inconsistencies #7094

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

sradevski
Copy link
Member

No description provided.

@sradevski sradevski requested a review from a team as a code owner April 18, 2024 07:42
Copy link

changeset-bot bot commented Apr 18, 2024

⚠️ No Changeset found

Latest commit: 5bc5ff9

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 Apr 18, 2024

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

Name Status Preview Comments Updated (UTC)
api-reference 🔄 Building (Inspect) Visit Preview Apr 18, 2024 7:44am
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 7:44am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs-ui ⬜️ Ignored (Inspect) Apr 18, 2024 7:44am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Apr 18, 2024 7:44am

@@ -54,7 +54,7 @@ medusaIntegrationTestRunner({
)

const response = await api.get(
`/admin/customer-groups/${group.id}/customers`,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is an anti-pattern and we should just use the customers endpoint with a filter (as done for eg. for products and price lists)

@@ -0,0 +1,66 @@
import { AdminCustomerGroupResponse, BatchMethodRequest } from "@medusajs/types"
Copy link
Contributor

Choose a reason for hiding this comment

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

A general thought: Are we sure we want to remove existing batch endpoints? If so, I think we keep adding todos to the admin clean-up. Maybe keeping these in and removing them in our polishing phase is better?

Copy link
Member Author

Choose a reason for hiding this comment

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

@olivermrbl it's a pretty small change in 1 place, so I'd rather do it sooner than later. I am actually planning to just unify all of the batch endpoints in 1 go, both on FE and BE as it will be faster

@sradevski sradevski merged commit ccb50bb into develop Apr 18, 2024
24 checks passed
@sradevski sradevski deleted the fix/update-customer-endpoints-zod branch April 18, 2024 08:30
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

3 participants