From 516bdc9158c833cd889405c869ae5fb86892cd04 Mon Sep 17 00:00:00 2001 From: Muhammad Izza Alfiansyah Date: Sun, 30 Jun 2024 15:10:21 +0700 Subject: [PATCH] remove all data --- website/src/App.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/website/src/App.tsx b/website/src/App.tsx index 4157f2c..ae8f421 100644 --- a/website/src/App.tsx +++ b/website/src/App.tsx @@ -63,6 +63,15 @@ export default function (props: JSX.HTMLAttributes) { const deleteAllData = async () => { await supabase.from("pengaturan").update({ running: false }).eq("id", 1); await supabase.from("kondisi_tapai").delete().neq("id", "0"); + await supabase + .from("realtime_data") + .update({ + kadar_gas: 0, + kelembaban: 0, + suhu: 0, + created_time: 0, + }) + .eq("id", 1); setLastHistori(null);