Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBenes3 committed Dec 1, 2023
1 parent dccb8f8 commit 1a8de68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GAPP.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ app.get('/get/cdp/hb', async (req, res) => {
});

app.post('/post/data', (req, res) => {
console.log("Received data");
try {
const receivedData = req.body;
appendToJsonFile("ALLDATA.json", receivedData);
if (receivedData.topic.endsWith("up")) {
receivedData.message
const deviceID = JSON.parse(receivedData.message).end_device_ids.device_id;
if (deviceID == 'fik8b') {
saveDataToFile("fik8b.json", receivedData);
Expand Down

0 comments on commit 1a8de68

Please sign in to comment.