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

Commit 7454677

Browse files
check on integer number on request
1 parent 4f60c84 commit 7454677

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ app.post('/update', (req, res) => {
3434
let total = JSON.parse(req.body.total);
3535
let first_connected = JSON.parse(req.body.first_connected);
3636

37-
if (typeof(touches) == 'number' &&
38-
typeof(vibrs) == 'number' &&
39-
typeof(total) == 'number' &&
37+
if (Number.isInteger(touches) &&
38+
Number.isInteger(vibrs) &&
39+
Number.isInteger(total) &&
4040
typeof(first_connected) == 'boolean') {
4141

4242
if (first_connected) {

0 commit comments

Comments
 (0)