-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(medusa, core-flows): add retrieve stock location endpoint to api-v2 #6791
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
🦋 Changeset detectedLatest commit: d48268b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
integration-tests/modules/__tests__/stock-location/index.spec.ts
Outdated
Show resolved
Hide resolved
const { id } = req.params | ||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY) | ||
|
||
const [stock_location] = await remoteQuery( |
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.
comment: @carlos-r-l-rodrigues, your idea of adding a "throw-if-not-found" mechanism to remote query could make sense. I think in most endpoints, we are not checking for the existence of the retrieved resource when doing a get by ID.
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.
Or alternatively, we add the if (!result) {
to all get one endpoints, but I think having this baked in would be nice.
@pKorsholm, can you rebase and change base branch to develop before merging? |
No description provided.