cateditor: prod search sends season and region

This commit is contained in:
2019-09-18 15:46:12 -07:00
parent a3a34d4210
commit dfa2a7d4a5

View File

@ -416,9 +416,14 @@ export const store = new Vuex.Store({
commit('setCatalog', skeletonCatalog()) commit('setCatalog', skeletonCatalog())
}, },
async fetchProducts({ commit, dispatch }, text) { async fetchProducts({ commit, dispatch, getters }, text) {
commit('setLoadingProducts', true) commit('setLoadingProducts', true)
axios.post('/api/v1/products/search', text) axios.post('/api/v1/products/search',
{
text: text,
season: getters.catalogProperty('season'),
region: getters.catalogProperty('region')
})
.then(function(response) { .then(function(response) {
commit('setLoadingProducts', false) commit('setLoadingProducts', false)