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

ignore coupon limit checks #153

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

rajranjan0608
Copy link
Collaborator

This pull request primarily focuses on the CouponService in the couponService.ts file. The changes include the addition of a new parameter to the validateCouponData function, an update to how this function is called within the CouponService class, and an alteration to the UpdateExpression in the same class.

Changes to the validateCouponData function:

  • couponService.ts: Added a new ignoreCouponLimitCheck parameter to the validateCouponData function. This parameter is a boolean that defaults to true. When true, the function will ignore the check against the MAX_LIMIT_CAP value from the couponConfig. This change allows for more flexibility when validating coupons.

Updates to the CouponService class:

  • couponService.ts: The validateCouponData function is now called with the new ignoreCouponLimitCheck parameter within the CouponService class. This ensures that the function behaves as intended after the changes.
  • couponService.ts: The UpdateExpression in the CouponService class has been altered to include a reset field. This field is set to the reset value of the couponItem, defaulting to false if it is not present. This allows for the reset state of a coupon to be updated in the database.

@rajranjan0608 rajranjan0608 merged commit 62862dc into main Jul 22, 2024
1 check passed
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.

1 participant