|
|
|
@ -1515,7 +1515,7 @@ exports.writeMotorStatus = async (req, reply) => {
|
|
|
|
|
// For example, update a database with the new status, current, and temp values
|
|
|
|
|
let result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result = await Tank.findOneAndUpdate(
|
|
|
|
|
{ motor_id: motor_id },
|
|
|
|
|
{ $set: { motor_status: status } }
|
|
|
|
@ -1544,7 +1544,7 @@ exports.changeMotorStatus = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reply.send({ status_code: 200});
|
|
|
|
|
reply.send({ status_code: 200,motor_status: action });
|
|
|
|
|
} catch (err) {
|
|
|
|
|
throw boom.boomify(err);
|
|
|
|
|
}
|
|
|
|
|