Skip to content

fix: incorrect method export for POST endpoint#15852

Merged
wackerow merged 1 commit into
ethereum:devfrom
mdqst:patch-5
Sep 10, 2025
Merged

fix: incorrect method export for POST endpoint#15852
wackerow merged 1 commit into
ethereum:devfrom
mdqst:patch-5

Conversation

@mdqst
Copy link
Copy Markdown
Contributor

@mdqst mdqst commented Jul 17, 2025

Description

the handler was exported as GET, but inside it checks for req.method === "POST", which is never triggered since GET functions aren’t invoked for POST requests.

i've renamed the function to POST(...) so that it correctly handles POST requests, as per [Next.js App Router documentation](https://nextjs.org/docs/app/building-your-application/routing/handling-requests#handling-different-methods).

now the endpoint behaves as expected.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 17, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit b93453a
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6878b12792c86f0008fdd5fe
😎 Deploy Preview https://deploy-preview-15852--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 52 (🟢 up 5 from production)
Accessibility: 94 (no change from production)
Best Practices: 92 (no change from production)
SEO: 99 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

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

@github-actions
Copy link
Copy Markdown
Contributor

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions Bot added the Status: Stale This issue is stale because it has been open 30 days with no activity. label Aug 17, 2025
Copy link
Copy Markdown
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks @mdqst! Sorry for delay, pulling in

@wackerow wackerow merged commit edffb2c into ethereum:dev Sep 10, 2025
7 checks passed
@wackerow
Copy link
Copy Markdown
Member

@all-contributors please add @mdqst for bug fix

@allcontributors
Copy link
Copy Markdown
Contributor

@wackerow

@mdqst already contributed before to bug

@mdqst
Copy link
Copy Markdown
Contributor Author

mdqst commented Sep 10, 2025

wackerow, pls check this pr

This was referenced Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Stale This issue is stale because it has been open 30 days with no activity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants