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): Throw on flat rate shipping options with no amount #2628

Merged
merged 33 commits into from
Dec 12, 2022

Conversation

olivermrbl
Copy link
Contributor

What
When attempting to create or update shipping options of type flat_rate, we should require an amount. This PR throws when not the case.

@olivermrbl olivermrbl requested a review from a team as a code owner November 18, 2022 12:32
@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2022

🦋 Changeset detected

Latest commit: ace0d02

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

@olivermrbl olivermrbl force-pushed the fix/shipping-option-creation branch from 2fa49bf to 91bed09 Compare November 18, 2022 13:52
Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM - only a few comments. Also, I see that it does not only includes the flat rate issue anymore :) We might need to change the description of that pr

packages/medusa/src/services/shipping-option.ts Outdated Show resolved Hide resolved
packages/medusa/src/services/shipping-option.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@pKorsholm pKorsholm left a comment

Choose a reason for hiding this comment

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

Generally I think it looks good.

+1 on @adrien2p's comment regarding pass-by-reference 😄

packages/medusa/src/services/shipping-option.ts Outdated Show resolved Hide resolved
packages/medusa/src/services/shipping-option.ts Outdated Show resolved Hide resolved
@olivermrbl olivermrbl requested a review from adrien2p December 7, 2022 11:13
@olivermrbl olivermrbl requested a review from pKorsholm December 8, 2022 18:12
@medusajs medusajs deleted a comment from gitguardian bot Dec 9, 2022
Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM. Just need the pipeline to finish

@gitguardian
Copy link

gitguardian bot commented Dec 12, 2022

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
5067995 Company Email Password c46f0a4 packages/medusa/src/services/tests/customer.js View secret
5165075 Company Email Password c46f0a4 packages/medusa/src/api/routes/store/customers/tests/reset-password.js View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

Copy link
Collaborator

@srindom srindom left a comment

Choose a reason for hiding this comment

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

LGTM!

@olivermrbl olivermrbl merged commit b2ea8b7 into develop Dec 12, 2022
@olivermrbl olivermrbl deleted the fix/shipping-option-creation branch December 12, 2022 17:34
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