fix: split gemini-token into GET health check + POST token request
All checks were successful
Build & Push / build-and-push (push) Successful in 1m33s
All checks were successful
Build & Push / build-and-push (push) Successful in 1m33s
Health check no longer triggers rate limiter, fixing toggle not appearing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,11 +24,7 @@ export default function ModeToggle({ mode, onChange }: ModeToggleProps) {
|
||||
if (!navigator.mediaDevices?.getUserMedia) return;
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/gemini-token', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ locale: 'en' }),
|
||||
});
|
||||
const res = await fetch('/api/gemini-token');
|
||||
const data = (await res.json()) as { success: boolean };
|
||||
if (data.success) setVoiceSupported(true);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user