diff --git a/scripts/mage2vs.js b/scripts/mage2vs.js index e130a461..5d7dc806 100644 --- a/scripts/mage2vs.js +++ b/scripts/mage2vs.js @@ -36,6 +36,7 @@ function getMagentoDefaultConfig(storeCode) { MAGENTO_ACCESS_TOKEN: apiConfig.accessToken, MAGENTO_ACCESS_TOKEN_SECRET: apiConfig.accessTokenSecret, MAGENTO_URL: apiConfig.url, + MAGENTO_MSI_STOCK_ID: config.msi.defaultStockId, REDIS_HOST: config.redis.host, REDIS_PORT: config.redis.port, REDIS_DB: config.redis.db, @@ -89,6 +90,7 @@ program magentoConfig.INDEX_NAME = storeView.elasticsearch.index magentoConfig.INDEX_META_PATH = '.lastIndex-' + cmd.storeCode + '.json' magentoConfig.MAGENTO_STORE_ID = storeView.storeId + magentoConfig.MAGENTO_MSI_STOCK_ID = storeView.msi.stockId } } diff --git a/src/api/stock.js b/src/api/stock.js index 0f7191e7..868447bc 100755 --- a/src/api/stock.js +++ b/src/api/stock.js @@ -22,7 +22,7 @@ export default ({ config, db }) => { */ api.get('/check/:sku', (req, res) => { - const stockProxy = _getProxy(req) + const stockProxy = _getProxy(req) if (!req.params.sku) { return apiStatus(res, 'sku parameter is required', 500);