TASK22019: phase 13 harden delete and involvement guards

This commit is contained in:
2026-03-13 13:02:49 +00:00
parent 0ca63d0228
commit 846cba1645
5 changed files with 231 additions and 10 deletions
+10 -2
View File
@@ -34,6 +34,16 @@ const hashAPIPath = (queryPath) => {
};
export default async function ApiProxy(req, res) {
if (
!req.body ||
typeof req.body.contactid === "undefined" ||
req.body.contactid.length === 0 ||
typeof req.body.incidentid === "undefined" ||
req.body.incidentid.length === 0
) {
return res.status(400).json();
}
var token = await getToken();
var contactid = req.body.contactid;
var queryUrl =
@@ -41,8 +51,6 @@ export default async function ApiProxy(req, res) {
req.body.incidentid +
")/pinswg_incident_contact_case_involvement/$ref";
console.log(req.body, queryUrl);
var crmUrl = "https://" + process.env.CRMURL;
var crmVersion = process.env.CRMURL_VERSION;