Skip to content

Sayali: 🔥 change promotion-eligibility API call from GET to POST to match …#5234

Merged
one-community merged 1 commit into
developmentfrom
Sayali_Fix_PromotionEligibility_Frontend
May 8, 2026
Merged

Sayali: 🔥 change promotion-eligibility API call from GET to POST to match …#5234
one-community merged 1 commit into
developmentfrom
Sayali_Fix_PromotionEligibility_Frontend

Conversation

@sayali-2308
Copy link
Copy Markdown
Contributor

…backend endpoint fix

Description

Fixes production bug where Promotion Eligibility table showed "Failed to load Reviewers" error.
Changes the getPromotionEligibility API call from axios.get to axios.post to match the backend endpoint fix (backend PR OneCommunityGlobal/HGNRest#2201

Related PRS (if any):

This frontend PR is related to backend PR OneCommunityGlobal/HGNRest#2201
To test this frontend PR you need to checkout backend PR OneCommunityGlobal/HGNRest#2201

Main changes explained:

Updated src/actions/promotionActions.js — changed axios.get to axios.post for PROMOTION_ELIGIBILITY endpoint so it matches the updated backend route

How to test:

  1. Check out branch Sayali_Fix_PromotionEligibility_Frontend
  2. Check out backend branch Sayali_Fix_PromotionEligibility_Requestor (PR Tapan Fixed the Pagination UI in Members Table for Project Reports #2201)
  3. Run npm install and npm run start:local on frontend
  4. Run npm install, npm run build, npm run start on backend
  5. Clear site data/cache
  6. Log in as admin
  7. Navigate to localhost:5173/pr-dashboard/promotion-eligibility
  8. Verify table loads with reviewer data — no "Failed to load Reviewers" error
  9. Verify dark mode works

Screenshots or videos of changes:

image

Note:

This is a one-line frontend fix. The root cause was that the backend GET /api/promotion-eligibility endpoint checks req.body.requestor for permissions, but GET requests don't carry a body in production. Backend fix changes it to POST, this PR updates the frontend call accordingly.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 0b89c64
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69fc4d57f1240600082d0d6c
😎 Deploy Preview https://deploy-preview-5234--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown

@HemanthNidamanuru HemanthNidamanuru left a comment

Choose a reason for hiding this comment

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

Hi Sayali,

Thank you for working on this PR. Everything works as expected.

Tested:

  1. Promotion Eligibility page loads reviewer data correctly with no "Failed to load Reviewers" error
  2. Dark mode works as expected
Image Image

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit b6c4052 into development May 8, 2026
10 checks passed
@one-community one-community changed the title Sayali: change promotion-eligibility API call from GET to POST to match … Sayali: 🔥 change promotion-eligibility API call from GET to POST to match … May 8, 2026
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