Merged PR 2295: resolved lint warnings
resolved lint warnings Related work items: #22873
This commit is contained in:
@@ -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" ||
|
||||
|
||||
Reference in New Issue
Block a user