Varun 8 months ago
commit 83135549c9

@ -2973,11 +2973,11 @@ exports.motorAction = async (req, reply) => {
console.log(thresholdTime,"thresholdTime") console.log(thresholdTime,"thresholdTime")
console.log("motor stopping because it entered this condition") console.log("motor stopping because it entered this condition")
// Emit the threshold time notification // Emit the threshold time notification
eventEmitter.emit( // eventEmitter.emit(
"sendThresholdTimeNotification", // "sendThresholdTimeNotification",
fcmToken, // fcmToken,
`Motor has reached its time threshold of ${req.body.manual_threshold_time} minutes and will stop.` // `Motor has reached its time threshold of ${req.body.manual_threshold_time} minutes and will stop.`
); // );
await Tank.updateOne( await Tank.updateOne(
{ customerId, "connections.inputConnections.motor_id": motorId }, { customerId, "connections.inputConnections.motor_id": motorId },

Loading…
Cancel
Save