TASK22019: phase 13 harden delete and involvement guards
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user