added proxy updting case to avoid cors and be SSR

This commit is contained in:
robert.bond@test.gov.wales
2021-09-14 14:36:26 +01:00
parent 855b8b1bd9
commit 1a1ad02fcf
4 changed files with 117 additions and 28 deletions
+3 -2
View File
@@ -348,7 +348,7 @@ export const createCase = (appealTypeId) => {
console.log(config);
return axios(config)
.then((res) => {
console.log("posted ", res.data);
// console.log("posted ", res.data);
return res.data;
})
.catch((error) => {
@@ -361,7 +361,8 @@ export const updateCase = (incidentId, updateBody, updateFormCollection) => {
var config = {
method: "patch",
url: WEBAPI_URL + updateFormCollection + "(" + incidentId + ")",
//url: WEBAPI_URL + updateFormCollection + "(" + incidentId + ")",
url: "/api/proxy/" + updateFormCollection + "(" + incidentId + ")",
headers: {
"OData-MaxVersion": "4.0",
"OData-Version": "4.0",