fix: perbaiki endpoint kontrol exhaust fan - Ubah endpoint dari /sensor/exhaust ke /sensor/control - Tambah mode MANUAL dan field fanExhaust - Exhaust fan sekarang bisa dikontrol dengan benar
This commit is contained in:
parent
b16e270e79
commit
3448854cde
|
|
@ -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
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue