-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(region): Region create, delete, update admin endpoints #6332
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
integration-tests/plugins/__tests__/regions/admin/create-region.spec.ts
Outdated
Show resolved
Hide resolved
integration-tests/plugins/__tests__/regions/admin/update-region.spec.ts
Outdated
Show resolved
Hide resolved
@medusajs/engineering, this one is longing for a review 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, few todo's left
integration-tests/plugins/__tests__/regions/admin/regions.spec.ts
Outdated
Show resolved
Hide resolved
integration-tests/plugins/__tests__/regions/admin/regions.spec.ts
Outdated
Show resolved
Hide resolved
defaultFields: defaultAdminRegionFields, | ||
defaultRelations: defaultAdminRegionRelations, | ||
allowedRelations: allowedAdminRegionRelations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion(nit): we could just have defaultAdminRegionFields
which already include the relations. In the route (for now but in the middleware would be better) we can use the util to get the select and relations from the fields. wdyt? Just in order to start the cleanup and not have to maintain two array etc and facilitate the migration later
What
Add
POST /admin/regions
Add
POST /admin/regions/:id
Add
DELETE /admin/regions/:id
All are added for v2 using API Routes and workflows.
In follow-up PRs, I will add support for passing countries in update and create.
Update: First follow-up PR is #6372