|
|
|
@ -5,6 +5,11 @@ const fastify = require("fastify")({
|
|
|
|
|
logger: true,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exports.addTanks = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
@ -134,7 +139,7 @@ exports.getTank = async (req, reply) => {
|
|
|
|
|
// }
|
|
|
|
|
//};
|
|
|
|
|
|
|
|
|
|
exports.getTanklevels = async (req, reply) => {
|
|
|
|
|
exports.updateTanklevels = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
const customerId = req.params.customerId;
|
|
|
|
|
const tank = await Tank.find({customerId});
|
|
|
|
@ -168,3 +173,23 @@ exports.getTanklevels = async (req, reply) => {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exports.getTanklevels = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
const customerId = req.params.customerId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const updated_data = await Tank.find({ customerId: customerId });
|
|
|
|
|
|
|
|
|
|
reply.send({ status_code: 200, data: updated_data});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { message: 'success' };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
catch (err) {
|
|
|
|
|
throw boom.boomify(err);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|