made update tank levels api hit automatically when get tank levels called

master
varun 3 years ago
parent 0446f665c8
commit 6d1dc5611d

@ -4,6 +4,7 @@ const boom = require("boom");
const fastify = require("fastify")({
logger: true,
});
const tanksController = require("./tanksController")
@ -179,6 +180,7 @@ exports.updateTanklevels = async (req, reply) => {
exports.getTanklevels = async (req, reply) => {
try {
const customerId = req.params.customerId;
await tanksController.updateTanklevels(req)
const updated_data = await Tank.find({ customerId: customerId });

Loading…
Cancel
Save