async storeProduct({commit}, payload) {
//commit('UPDATE_PRODUCT');
commit('loadingStatus', true);
try {
const response = await axios.post(`${API_PANEL_BASE_URL}/products`,
payload['product'],
{
headers: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization' : `Bearer ${store.getters.getAccessToken}`
}
}
);
commit('loadingStatus', false)
commit('storeProduct', response.data)
} catch (err) {
commit('loadingStatus', false);
if (err.response.status === 401) {
//console.log(err.response.status)
authFunctions.logout();
}
}
},