Merged PR 2295: resolved lint warnings

resolved lint warnings

Related work items: #22873
This commit is contained in:
Robert Bond
2026-05-05 17:13:53 +00:00
parent 46a0e0b185
commit 1a2c3ede3b
19 changed files with 128 additions and 127 deletions
+10 -4
View File
@@ -9,6 +9,8 @@ const ApiProxy = nextConnect();
ApiProxy.use(middleware);
ApiProxy.post(async (req, res) => {
const getFieldValue = (field) => (Array.isArray(field) ? field[0] : field);
const checkHash = req.query.hash;
if (typeof checkHash === "undefined" || checkHash.length === 0) {
@@ -32,10 +34,14 @@ ApiProxy.post(async (req, res) => {
});
}
const appealData = req.body.appealData;
const containerID = req.body?.containerID?.[0];
const casefolderID = req.body?.casefolderID?.[0];
const repOrAppeal = req.body.repOrAppeal || false;
const appealData = getFieldValue(req.body?.appealData);
const containerID = getFieldValue(req.body?.containerID);
const casefolderID = getFieldValue(req.body?.casefolderID);
const repOrAppealRaw = getFieldValue(req.body?.repOrAppeal);
const repOrAppeal =
repOrAppealRaw === true ||
repOrAppealRaw === "true" ||
repOrAppealRaw === "1";
if (
typeof containerID === "undefined" ||