|
|
|
@ -1486,10 +1486,10 @@ exports.readMotorStatus = async (req, reply) => {
|
|
|
|
|
// For example, you can update a database or trigger an action
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|
throw boom.boomify(err);
|
|
|
|
|
}
|
|
|
|
|