cleared debug, updated new appeal add about you
This commit is contained in:
@@ -22,22 +22,27 @@ const hashAPIPath = (queryPath) => {
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var createCaseBody = req.body;
|
||||
var contactid = req.query.contactid;
|
||||
var appealTypeId = req.query.appealTypeId;
|
||||
var lpaID = req.query.lpaID;
|
||||
var queryUrl = "incidents";
|
||||
var token = await getToken();
|
||||
|
||||
var data = JSON.stringify({
|
||||
var data = {
|
||||
"title": "insertion test case",
|
||||
"caseorigincode": 3,
|
||||
"servicestage": 1,
|
||||
"customerid_contact@odata.bind": "/contacts(" + contactid + ")",
|
||||
"pinswg_appealcasetype": appealTypeId,
|
||||
"pinswg_AssociatedLPA@odata.bind": "/accounts(" + lpaID + ")",
|
||||
});
|
||||
};
|
||||
var newData = Object.assign(data, createCaseBody);
|
||||
|
||||
console.log(data, WEBAPI_URL + queryUrl);
|
||||
delete newData.lpaTypes;
|
||||
delete newData.appealTypes;
|
||||
|
||||
console.log("/////Create Case:", newData);
|
||||
|
||||
var config = {
|
||||
method: "post",
|
||||
@@ -50,7 +55,7 @@ export default async function ApiProxy(req, res) {
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: data,
|
||||
data: JSON.stringify(data),
|
||||
};
|
||||
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
|
||||
Reference in New Issue
Block a user