changes in read motor status

master
varun 2 years ago
parent ee8bd5a426
commit 48e331d3a6

@ -1486,10 +1486,10 @@ exports.readMotorStatus = async (req, reply) => {
// For example, you can update a database or trigger an action // For example, you can update a database or trigger an action
const motorInfo = await Tank.findOne({ motor_id: motor_id }); const motorInfo = await Tank.findOne({ motor_id: motor_id });
const motor_stp_status = motorInfo.motor_status const motor_status = motorInfo.motor_status
reply.send({ status_code: 200, motor_status:motor_stp_status }); reply.send({ status_code: 200, motor_status:motor_status });
} catch (err) { } catch (err) {
throw boom.boomify(err); throw boom.boomify(err);
} }

@ -73,6 +73,7 @@ const tanksSchema = new mongoose.Schema({
const motordataSchema = new mongoose.Schema({ const motordataSchema = new mongoose.Schema({
customerId: { type: String, default: null }, customerId: { type: String, default: null },
supplierTank: { type: String, default: null }, supplierTank: { type: String, default: null },

Loading…
Cancel
Save