fixed variable buzzer when turning on

This commit is contained in:
Muhammad Izza Alfiansyah 2024-07-09 16:16:41 +07:00
parent 6b53304630
commit 4ce311a5a9
1 changed files with 4 additions and 5 deletions

View File

@ -670,13 +670,12 @@ void insertHistory(bool berhasil = true) {
String json = JSON.stringify(req); String json = JSON.stringify(req);
JSONVar sett; JSONVar reqSet;
req["buzzer_on"] = true; reqSet["buzzer_on"] = false;
String jsonSett = JSON.stringify(sett); String jsonReqSet = JSON.stringify(reqSet);
db.insert("histori_fermentasi", json, false); db.from("pengaturan").eq("id", "1").doUpdate(jsonReqSet);
db.from("pengaturan").eq("id", "1").doUpdate(jsonSett);
callUser(berhasil); callUser(berhasil);
pengujian = true; pengujian = true;