Skip to content

Fix #25: Discount API subtracts the percent value directly#30

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
posthog-watcher/issue-25
Draft

Fix #25: Discount API subtracts the percent value directly#30
github-actions[bot] wants to merge 1 commit into
mainfrom
posthog-watcher/issue-25

Conversation

@github-actions

Copy link
Copy Markdown

Fixes #25

Generated by posthog-watcher-action using pi.

Summary

The /discount endpoint passes percent to calculateDiscountedPrice, which currently subtracts the numeric percent directly from price instead of subtracting that percentage of the price.

Triage rationale

The bug is isolated to one calculation in src/business.js, with an existing failing test that directly captures the expected behavior.

Changed files

  • src/business.js

Validation

  • node -e "require('./src/business'); require('./src/app'); console.log('modules load')"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discount API subtracts the percent value directly

0 participants