From 9d887255305aeb718a0c268877bc4a50f09f7f22 Mon Sep 17 00:00:00 2001 From: Varun Date: Thu, 20 Feb 2025 15:47:15 +0530 Subject: [PATCH] changes --- src/controllers/storeController.js | 4 ++-- src/routes/storeRoute.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/storeController.js b/src/controllers/storeController.js index f7239cdc..eb6896ef 100644 --- a/src/controllers/storeController.js +++ b/src/controllers/storeController.js @@ -10,7 +10,7 @@ const fastify = require("fastify")({ return uuidv4(); }, }); -const { Install, ProfilePictureInstall, SensorQuotation,generateinstallationId,Store,WaterLeverSensor,MotorSwitchSenso,Insensors,generatequatationId, HardwareCart, ServiceCart, Sales} = require("../models/store"); +const {Iotprice, Install, ProfilePictureInstall, SensorQuotation,generateinstallationId,Store,WaterLeverSensor,MotorSwitchSenso,Insensors,generatequatationId, HardwareCart, ServiceCart, Sales} = require("../models/store"); const { User,Counter, generateBookingId,resetCounter,generateCustomerId,ProfilePicture} = require('../models/User') @@ -1585,7 +1585,7 @@ exports.createEstimationPrice = async (req, reply) => { const { name, type, quantity } = item; // Fetch the unit price from IotPrice collection - const priceEntry = await IotPrice.findOne({ name, type }); + const priceEntry = await Iotprice.findOne({ name, type }); if (!priceEntry) { itemDetails.push({ diff --git a/src/routes/storeRoute.js b/src/routes/storeRoute.js index 2ec56e7e..a639325a 100644 --- a/src/routes/storeRoute.js +++ b/src/routes/storeRoute.js @@ -1335,7 +1335,7 @@ fastify.post("/api/createEstimationPrice", { required: ["items"] } }, - handler: estimationController.createEstimationPrice + handler: storeController.createEstimationPrice }); fastify.post("/api/editQuotationForSensor/:quatationId", {