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(medusa, core-flows): add retrieve stock location endpoint to api-v2 #6791

Merged
merged 27 commits into from
Mar 25, 2024

Conversation

pKorsholm
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Mar 22, 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 Mar 25, 2024 3:32pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs-ui ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2024 3:32pm
medusa-dashboard ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2024 3:32pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2024 3:32pm

@pKorsholm pKorsholm changed the base branch from feat/create-batch-job to feat/create-stock-location March 22, 2024 10:29
Copy link

changeset-bot bot commented Mar 22, 2024

🦋 Changeset detected

Latest commit: d48268b

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

This PR includes changesets to release 2 packages
Name Type
@medusajs/core-flows Patch
@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

@pKorsholm pKorsholm changed the title Feat/get stock location feat(medusa, core-flows): add get-stock-location endpoint Mar 22, 2024
@pKorsholm pKorsholm changed the title feat(medusa, core-flows): add get-stock-location endpoint feat(medusa, core-flows): add retrieve stock location endpoint to api-v2 Mar 22, 2024
@pKorsholm pKorsholm marked this pull request as ready for review March 22, 2024 15:40
@pKorsholm pKorsholm requested a review from a team as a code owner March 22, 2024 15:40
@pKorsholm pKorsholm requested review from riqwan, fPolic and carlos-r-l-rodrigues and removed request for a team March 22, 2024 15:40
const { id } = req.params
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)

const [stock_location] = await remoteQuery(
Copy link
Contributor

@olivermrbl olivermrbl Mar 25, 2024

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.

Copy link
Contributor

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.

@olivermrbl
Copy link
Contributor

@pKorsholm, can you rebase and change base branch to develop before merging?

@pKorsholm pKorsholm changed the base branch from feat/create-stock-location to feat/delete-stock-location March 25, 2024 15:26
@pKorsholm pKorsholm changed the base branch from feat/delete-stock-location to develop March 25, 2024 15:29
@pKorsholm pKorsholm merged commit 20132d7 into develop Mar 25, 2024
24 checks passed
This was referenced Mar 25, 2024
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.

4 participants