diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index c95ed3c5..a351a92e 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -2992,7 +2992,7 @@ exports.motorAction = async (req, reply) => { receiverfinalwaterlevel: receiverFinalWaterLevel.toString(), quantity_delivered: quantityDelivered.toString(), runtime: runtime.toString(), - stopped_by:loggedInUser + stopped_by:loggedInUser.name } } ); @@ -3127,6 +3127,7 @@ exports.motorAction = async (req, reply) => { let dynamicInstanceId = null; let user_name = loggedInUser.name + console.log(user_name,"user_name in stop1") if (tankWithMotor) { const connection = tankWithMotor.connections.inputConnections.find(conn => conn.motor_id === motorId); if (connection && connection.start_instance_id) { @@ -3172,6 +3173,7 @@ exports.motorAction = async (req, reply) => { async function stopMotor(motorId, customerId, start_instance_id,user_name) { + console.log(user_name,"user_name in stop2") const currentTime = moment().tz('Asia/Kolkata').format('DD-MMM-YYYY - HH:mm'); await Tank.updateOne( { customerId, "connections.inputConnections.motor_id": motorId },