IO-256 Remove credentials with Axios calls for QBO.
This commit is contained in:
@@ -9,7 +9,6 @@ import { auth, logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||
import { UPDATE_PAYMENTS } from "../../graphql/payments.queries";
|
||||
|
||||
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
@@ -33,20 +32,15 @@ export function PaymentExportButton({
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
|
||||
const handleQbxml = async () => {
|
||||
logImEXEvent("accounting_payment_export");
|
||||
setLoading(true);
|
||||
//Check if it's a QBO Setup.
|
||||
let PartnerResponse;
|
||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||
PartnerResponse = await axios.post(
|
||||
`/qbo/payments`,
|
||||
{
|
||||
payments: [paymentId],
|
||||
},
|
||||
{ withCredentials: true }
|
||||
);
|
||||
PartnerResponse = await axios.post(`/qbo/payments`, {
|
||||
payments: [paymentId],
|
||||
});
|
||||
} else {
|
||||
//Default is QBD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user