From 58b19e85641c06db8bd7e1844c3b22fbb0e6dc4f Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Fri, 27 Jun 2025 11:58:50 +0530 Subject: [PATCH] naming chnages --- src/controllers/installationController.js | 4 ++-- src/models/store.js | 2 +- src/routes/installationRoute.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/controllers/installationController.js b/src/controllers/installationController.js index e9d3962b..b93762a8 100644 --- a/src/controllers/installationController.js +++ b/src/controllers/installationController.js @@ -9728,7 +9728,7 @@ exports.updateHardwareList = async (req, reply) => { if (!support) return reply.code(404).send({ error: "Support record not found" }); const escalationIssue = (support.categorizedIssues || []).find(issue => - issue.category === "Escalation" && issue.hardwareId === hardwareId + issue.category === "OutDoor Escalation" && issue.hardwareId === hardwareId ); if (!escalationIssue) { @@ -10120,7 +10120,7 @@ exports.resolvedIssuesForSupport = async (req, reply) => { }); } - if (!["Escalation", "Pending"].includes(category)) { + if (!["OutDoor Escalation", "LongTerm Issues"].includes(category)) { return reply.code(400).send({ message: "Invalid category. Only 'Escalation' or 'Pending' are allowed", }); diff --git a/src/models/store.js b/src/models/store.js index 474034df..b5926eb9 100644 --- a/src/models/store.js +++ b/src/models/store.js @@ -268,7 +268,7 @@ const installationschema = new mongoose.Schema({ }, category: { type: String, - enum: ["Power Outage", "Resolved", "Escalation","Pending"], + enum: ["Power Outage", "Resolved", "OutDoor Escalation","LongTerm Issues"], required: true }, // ticketId: String, diff --git a/src/routes/installationRoute.js b/src/routes/installationRoute.js index aee1ace7..258c0942 100644 --- a/src/routes/installationRoute.js +++ b/src/routes/installationRoute.js @@ -842,8 +842,8 @@ module.exports = function (fastify, opts, next) { type: 'string', enum: ["Power Outage", "Resolved", - "Escalation", - "Pending"] + "OutDoor Escalation", + "LongTerm Issues"] } } },