From 3252b323d3250e6eda40904279f41122d500a1c9 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Mon, 8 Jun 2026 23:54:02 +0700 Subject: [PATCH] fix(voice): correct API URL path for voice command - Change /voice/command to /api/voice/command - Nginx proxies /api/* routes; /voice/command returns 405 Co-Authored-By: Claude Opus 4.8 --- services/frontend/src/shared/hooks/useAudioTransmit.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/frontend/src/shared/hooks/useAudioTransmit.ts b/services/frontend/src/shared/hooks/useAudioTransmit.ts index 9f62c05..91f839e 100644 --- a/services/frontend/src/shared/hooks/useAudioTransmit.ts +++ b/services/frontend/src/shared/hooks/useAudioTransmit.ts @@ -6,12 +6,13 @@ const SAMPLE_RATE = 24000; async function sendTransmitCommand(command: string): Promise { // Send via HTTP API - const resp = await fetch(`${getAPIURL()}/voice/command`, { + const resp = await fetch(`${getAPIURL()}/api/voice/command`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ command }), }); if (!resp.ok) { + console.warn("HTTP command response:", resp.status, resp.statusText); const text = await resp.text().catch(() => resp.statusText); console.warn("HTTP command failed:", text); throw new Error(`HTTP ${resp.status}: ${text}`);