Skip to content

fix: update queryKey for fetchCouponCodeRequests to use correct parameters #1376

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

Conversation

ahmad-hassan-dev
Copy link
Contributor

@ahmad-hassan-dev ahmad-hassan-dev commented Jun 4, 2025

This PR updates the query key indices used in the couponCodeRequests query function to ensure the correct user email and state are sent in the API payload. Previously, the wrong index was used, resulting in 'requests' being sent instead of the actual user email. With this fix, coupon code requests are now fetched correctly for the authenticated user.

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)
  • Ensure English strings are marked for translation. See documentation for more details.

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.26%. Comparing base (0434de7) to head (9305db8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1376   +/-   ##
=======================================
  Coverage   90.26%   90.26%           
=======================================
  Files         418      418           
  Lines        9358     9358           
  Branches     2174     2239   +65     
=======================================
  Hits         8447     8447           
+ Misses        877      873    -4     
- Partials       34       38    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

LGTM! Great catch on this, and brings it to parity with the fetchLicenseRequests above. Confirmed by observing the network request on production to see the incorrect email provided in the request payload. Thanks!

image

@ahmad-hassan-dev ahmad-hassan-dev merged commit 8071b77 into master Jun 4, 2025
9 checks passed
@ahmad-hassan-dev ahmad-hassan-dev deleted the ahmad-hassan-dev/update-querykey-for-fetchCouponCodeRequests branch June 4, 2025 19:07
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.

3 participants