From cc1cf5f374b5d631b987eaeea6f681aafdf31063 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Mon, 1 Apr 2024 00:15:08 +1300 Subject: [PATCH] mark position as updated when updating from map report --- src/mqtt.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mqtt.js b/src/mqtt.js index 0c552ec..b1fb980 100644 --- a/src/mqtt.js +++ b/src/mqtt.js @@ -636,6 +636,7 @@ client.on("message", async (topic, message) => { has_default_channel: mapReport.hasDefaultChannel, position_precision: mapReport.positionPrecision, num_online_local_nodes: mapReport.numOnlineLocalNodes, + position_updated_at: new Date(), }; await prisma.node.upsert({ @@ -648,6 +649,7 @@ client.on("message", async (topic, message) => { }, update: data, }); + } catch (e) { console.error(e); }