diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx index ffa828f..b9c8293 100644 --- a/src/components/ControlPanel.tsx +++ b/src/components/ControlPanel.tsx @@ -251,14 +251,14 @@ export default function ControlPanel() { const newState = !isExhaustOn try { - // Endpoint untuk exhaust bisa disesuaikan dengan backend - const response = await fetch(`${API_URL}/sensor/exhaust`, { + const response = await fetch(`${API_URL}/sensor/control`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ - exhaust: newState + mode: 'MANUAL', + fanExhaust: newState }) })