Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded Magento Api Version #11

Open
lukeromanowicz opened this issue May 10, 2019 · 0 comments
Open

Hardcoded Magento Api Version #11

lukeromanowicz opened this issue May 10, 2019 · 0 comments

Comments

@lukeromanowicz
Copy link

lukeromanowicz commented May 10, 2019

There is a clean way neither to set a different API version nor no API version at all (in case you use some unversioned API endpoints. Options should not be mutated on client creation.

https://github.com/DivanteLtd/magento2-rest-client/blob/30a67752e65a8d02eac3c7caa1ace51ea2c5f815/index.js#L19-L34

A quick workaround for now is to bring back the original value after MagentoClient initialization.

    const client = Magento2Client(config.magento1.customApi)
    config.magento1.customApi.version = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant