Open rain2o opened 4 years ago
@ResuBaka Ah, good catch. I have updated those two with the optional parameter. I noticed that the Magento 1 client node module does use a token in the API calls, but the order.js
function create
would need to be updated to accept this token as well. I don't have a Magento 1 instance I can test this on though, so I don't know how it impacts it. But for now, the parameter is in src/platform/magento1/order.js
if the module does get updated in the future.
Closes #501
I wasn't sure of the best way to approach this as it is specific to Magento. I tried taking the advise of @pkarw to only work in the
src/api/platform
level, but passing the customer token as a parameter has to be handled insrc/api/order.ts
somehow, and then passed to the proxy. I tried to do this in the least intrusive way I could find, but I don't know how it will impact other platform proxies.Alternatively, we could potentially add the token to the
req.body
instead, and then extract it in the Magento 2 proxy, or directly ino2m.js
, but I don't know if forcing an additional property to thereq.body
in the API is a good idea.Any suggestions or recommendations are welcome.