diff --git a/sensor.html b/sensor.html
index 843a9d2..edcf52f 100644
--- a/sensor.html
+++ b/sensor.html
@@ -210,11 +210,12 @@
Record
"Content-Type": "application/json"
},
body: JSON.stringify({
- data: this.records,
+ data: JSON.stringify(this.records),
user: name
})
});
- const resData = res.json();
+ const resData = await res.json();
+
if (resData.code == 200) {
alert("Data uploaded successfully. Thanks!");
}