|
|
|
@ -74,8 +74,8 @@ exports.adminSignUp = async (request, reply) => {
|
|
|
|
|
|
|
|
|
|
exports.integratingHardwareidToTank = async (request, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
const { customerId, tankName,tankLocation,hardwareId } = request.body
|
|
|
|
|
const tank = await Tank.findOneAndUpdate({customerId, tankName:tankName ,tankLocation:tankLocation.toLowerCase()}, { $set: { hardwareId: hardwareId } });
|
|
|
|
|
const { customerId, tankName,tankLocation,hardwareId,hardwareId_company,hardwareId_type } = request.body
|
|
|
|
|
const tank = await Tank.findOneAndUpdate({customerId, tankName:tankName ,tankLocation:tankLocation.toLowerCase()}, { $set: { hardwareId: hardwareId,hardwareId_company:hardwareId_company,hardwareId_type:hardwareId_type } });
|
|
|
|
|
reply.send({ status_code: 200, message:`${hardwareId} set to ${tankName}` });
|
|
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|