Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

[2310-msi] Default stockId and from storeView. #227

Merged
merged 3 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/mage2vs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down