Skip to content

Commit

Permalink
feat: Data upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanzhi33 committed Jul 4, 2024
1 parent e962d66 commit 8bf33ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ <h3>Record</h3>
"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!");
}
Expand Down

0 comments on commit 8bf33ec

Please sign in to comment.