From 6ce5beff8b9f6ee1a51fcc6ab5cf442d2829c572 Mon Sep 17 00:00:00 2001 From: Fruittips Date: Mon, 27 Nov 2023 15:12:18 +0800 Subject: [PATCH] fix, nodeiD fireprobability? --- fire-cloud/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fire-cloud/index.js b/fire-cloud/index.js index e1e6c74..cbdb981 100644 --- a/fire-cloud/index.js +++ b/fire-cloud/index.js @@ -111,8 +111,8 @@ async function connectAndSubscribe() { const rowId = data[0].id; const lambdaRes = await invokeAnalytics(rowId, temperature, flameSensorValue); - const nodeId = lambdaRes.node_id; - const fireProbability = fireData.fire_probability; + const nodeId = messageJson.id; + const fireProbability = lambdaRes.fire_probability; if (fireProbability === null) { console.log("lambda function failed to calculate fire probability");