appeal update case

This commit is contained in:
robert.bond@test.gov.wales
2021-09-14 12:23:43 +01:00
parent 1208848d82
commit b7815c112e
3 changed files with 57 additions and 41 deletions
+5 -22
View File
@@ -335,14 +335,7 @@ export const createCase = (appealTypeId) => {
var config = {
method: "post",
url: WEBAPI_URL + "incidents",
headers: {
"OData-MaxVersion": "4.0",
"OData-Version": "4.0",
"Accept": "application/json",
"Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json",
"ServiceBusAuthorization": SASToken,
},
azureHeaders,
data: data,
};
console.log(config);
@@ -356,23 +349,13 @@ export const createCase = (appealTypeId) => {
});
};
export const updateCase = (incidentID, appealTypeId) => {
appealTypeId = parseInt(appealTypeId);
var data = JSON.stringify({
"pinswg_appealcasetype": appealTypeId,
});
export const updateCase = (incidentId, updateBody, updateFormCollection) => {
var data = JSON.stringify(updateBody);
var config = {
method: "patch",
url: WEBAPI_URL + `incidents(${incidentID})`,
headers: {
"OData-MaxVersion": "4.0",
"OData-Version": "4.0",
"Accept": "application/json",
"Prefer": "return=representation",
"Authorization": "Bearer " + accessToken,
"Content-Type": "application/json",
},
url: WEBAPI_URL + updateFormCollection + "(" + incidentId + ")",
azureHeaders,
data: data,
};
// console.log(config);