IO-256 Resolve QBO Payable Vendor Insert.

This commit is contained in:
Patrick Fic
2021-10-25 17:05:21 -07:00
parent 09187bdb7f
commit b718f49071
2 changed files with 2 additions and 2 deletions

View File

@@ -152,7 +152,7 @@ async function InsertVendorRecord(oauthClient, qbo_realmId, req, bill) {
body: JSON.stringify(Vendor),
});
setNewRefreshToken(req.user.email, result);
return result && result.Vendor;
return result && result.json && result.json.Vendor;
} catch (error) {
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
error:

View File

@@ -458,7 +458,7 @@ async function InsertInvoice(
body: JSON.stringify(invoiceObj),
});
setNewRefreshToken(req.user.email, result);
return result && result.Invoice;
return result && result.json && result.json.Invoice;
} catch (error) {
logger.log("qbo-receivables-error", "DEBUG", req.user.email, job.id, {
error,