async-postgres
async-postgres copied to clipboard
Magento order api: Missing custom header
lib/cart.js: Missing custom header; Therefore, I cannot get X-Forwarded-For (real IP) when creating an order
module.create = function (customerToken, customerId = null) {
if (customerId) {
return restClient.post('/customers/' + customerId + '/carts', {}, customerToken);
} else {
if (customerToken) {
return restClient.post('/carts/mine', {}, customerToken);
} else
{
return restClient.post('/guest-carts');
}
}
}
