From 2254b20ba956fff0476801a0c73ae592adf6843a Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Tue, 25 Feb 2025 14:21:06 +0530 Subject: [PATCH] COMMENT on low water level notification --- src/controllers/tanksController.js | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 1200dab0..82b0d8fc 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -2281,29 +2281,29 @@ eventEmitter.on( } ); -eventEmitter.on('sendLowWaterNotification', (fcmTokens, message) => { - const notificationMessage = `Warning: Water level is low in the tank. - Tank Name: ${tankName}, - Location: ${receiverTank.location}, - Type of Water: ${receiverTank.typeOfWater}, - Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%), - Date & Time: ${new Date().toLocaleString()}`; +// eventEmitter.on('sendLowWaterNotification', (fcmTokens, message) => { +// const notificationMessage = `Warning: Water level is low in the tank. +// Tank Name: ${tankName}, +// Location: ${receiverTank.location}, +// Type of Water: ${receiverTank.typeOfWater}, +// Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%), +// Date & Time: ${new Date().toLocaleString()}`; - // Send notifications using the provided FCM tokens - sendNotification(fcmTokens, notificationMessage); -}); +// // Send notifications using the provided FCM tokens +// sendNotification(fcmTokens, notificationMessage); +// }); -eventEmitter.on('sendCriticalLowWaterNotification', (fcmTokens, message) => { - const notificationMessage = `Critical Alert: Water level is critically low in the tank. - Tank Name: ${tankName}, - Location: ${receiverTank.location}, - Type of Water: ${receiverTank.typeOfWater}, - Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%), - Date & Time: ${new Date().toLocaleString()}`; +// eventEmitter.on('sendCriticalLowWaterNotification', (fcmTokens, message) => { +// const notificationMessage = `Critical Alert: Water level is critically low in the tank. +// Tank Name: ${tankName}, +// Location: ${receiverTank.location}, +// Type of Water: ${receiverTank.typeOfWater}, +// Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%), +// Date & Time: ${new Date().toLocaleString()}`; - // Send notifications using the provided FCM tokens - sendNotification(fcmTokens, notificationMessage); -}); +// // Send notifications using the provided FCM tokens +// sendNotification(fcmTokens, notificationMessage); +// });