diff --git a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx index b104212ca..1344a7411 100644 --- a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx +++ b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx @@ -45,10 +45,13 @@ export function JobsCloseExportButton({ //Check if it's a QBO Setup. let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post(`/qbo/receivables`, { - withCredentials: true, - jobIds: [jobId], - }); + PartnerResponse = await axios.post( + `/qbo/receivables`, + { + jobIds: [jobId], + }, + { withCredentials: true } + ); } else { //Default is QBD diff --git a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx index a42e48f1d..780817ad5 100644 --- a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx +++ b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx @@ -37,10 +37,13 @@ export function JobsExportAllButton({ let PartnerResponse; setLoading(true); if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post(`/qbo/receivables`, { - withCredentials: true, - jobIds: jobIds, - }); + PartnerResponse = await axios.post( + `/qbo/receivables`, + { + jobIds: jobIds, + }, + { withCredentials: true } + ); } else { let QbXmlResponse; try { diff --git a/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx b/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx index 32726842a..44f82faab 100644 --- a/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx +++ b/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx @@ -40,10 +40,13 @@ export function PayableExportAll({ setLoading(true); if (!!loadingCallback) loadingCallback(true); if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post(`/qbo/receivables`, { - withCredentials: true, - bills: billids, - }); + PartnerResponse = await axios.post( + `/qbo/receivables`, + { + bills: billids, + }, + { withCredentials: true } + ); } else { let QbXmlResponse; try { diff --git a/client/src/components/payable-export-button/payable-export-button.component.jsx b/client/src/components/payable-export-button/payable-export-button.component.jsx index 6910440ae..f54ff668a 100644 --- a/client/src/components/payable-export-button/payable-export-button.component.jsx +++ b/client/src/components/payable-export-button/payable-export-button.component.jsx @@ -41,10 +41,13 @@ export function PayableExportButton({ //Check if it's a QBO Setup. let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post(`/qbo/payables`, { - withCredentials: true, - bills: [billId], - }); + PartnerResponse = await axios.post( + `/qbo/payables`, + { + bills: [billId], + }, + { withCredentials: true } + ); } else { //Default is QBD diff --git a/client/src/components/payment-export-button/payment-export-button.component.jsx b/client/src/components/payment-export-button/payment-export-button.component.jsx index 4a43484d8..2bc6ec19a 100644 --- a/client/src/components/payment-export-button/payment-export-button.component.jsx +++ b/client/src/components/payment-export-button/payment-export-button.component.jsx @@ -37,10 +37,13 @@ export function PaymentExportButton({ //Check if it's a QBO Setup. let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post(`/qbo/payments`, { - withCredentials: true, - payments: [paymentId], - }); + PartnerResponse = await axios.post( + `/qbo/payments`, + { + payments: [paymentId], + }, + { withCredentials: true } + ); } else { //Default is QBD diff --git a/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx b/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx index 3c49c6c7f..6bb0f9fc6 100644 --- a/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx +++ b/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx @@ -35,10 +35,13 @@ export function PaymentsExportAllButton({ if (!!loadingCallback) loadingCallback(true); let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post(`/qbo/payments`, { - withCredentials: true, - payments: paymentIds, - }); + PartnerResponse = await axios.post( + `/qbo/payments`, + { + payments: paymentIds, + }, + { withCredentials: true } + ); } else { let QbXmlResponse; try { diff --git a/server.js b/server.js index cad3f477c..5cba6fd84 100644 --- a/server.js +++ b/server.js @@ -46,14 +46,15 @@ app.use(bodyParser.json({ limit: "50mb" })); app.use(bodyParser.urlencoded({ limit: "50mb", extended: true })); //app.use(enforce.HTTPS({ trustProtoHeader: true })); app.use( - cors({ - credentials: true, - origin: [ - "https://test.imex.online", - "http://localhost:3000", - "https://imex.online", - ], - }) + cors() + // { + // credentials: true, + // origin: [ + // "https://test.imex.online", + // "http://localhost:3000", + // "https://imex.online", + // ], + // } ); //Email Based Paths.