Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.

Commit 6816ce5

Browse files
try to catch true false error in parse request
1 parent 223d9eb commit 6816ce5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ app.post('/update', (req, res) => {
3838
data.vibrs = req.body.vibrs;
3939
data.total = req.body.total;
4040

41-
let first_connected = req.body.first_connected;
41+
//debug only
42+
data.first_connected = req.body.first_connected;
4243

43-
if (first_connected) {
44+
if (data.first_connected) {
4445
io.emit('first_connected', data);
4546
}
4647
else {

static/js/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ $( document ).ready(() => {
2222
$('#p-touches').text(data.touches);
2323
$('#p-vibrs').text(data.vibrs);
2424
$('#p-total').text(data.total);
25+
26+
//debug only
27+
$.notify(data.first_connected);
2528
});
2629
})

0 commit comments

Comments
 (0)