Spaces:
Runtime error
Runtime error
firefloc-nox Firefloc commited on
fix(onboarding): use POST for gateway health check in wizard (#334)
Browse filesThe test connection button in the onboarding wizard was using GET to
call /api/gateways/health, which only exports POST — resulting in a
405 and "Gateway unreachable" shown to the user.
Fixes the HTTP method to POST so the health probe works correctly.
Co-authored-by: Firefloc <firefloc@MacBook-Pro-de-Firefloc.local>
src/components/onboarding/onboarding-wizard.tsx
CHANGED
|
@@ -529,7 +529,7 @@ function StepGatewayLink({ isGateway, registration, onNext, onBack }: {
|
|
| 529 |
const testConnection = async () => {
|
| 530 |
setTesting(true)
|
| 531 |
try {
|
| 532 |
-
const res = await fetch('/api/gateways/health')
|
| 533 |
setHealthOk(res.ok)
|
| 534 |
} catch {
|
| 535 |
setHealthOk(false)
|
|
|
|
| 529 |
const testConnection = async () => {
|
| 530 |
setTesting(true)
|
| 531 |
try {
|
| 532 |
+
const res = await fetch('/api/gateways/health', { method: 'POST' })
|
| 533 |
setHealthOk(res.ok)
|
| 534 |
} catch {
|
| 535 |
setHealthOk(false)
|