Skip to content

Instantly share code, notes, and snippets.

@lkostrowski
Created April 4, 2017 21:15
Show Gist options
  • Select an option

  • Save lkostrowski/8fd3d00cc0b63c8415be431e2cf4897e to your computer and use it in GitHub Desktop.

Select an option

Save lkostrowski/8fd3d00cc0b63c8415be431e2cf4897e to your computer and use it in GitHub Desktop.
import eventBus from 'services/eventBus';
const deleteApiUrl = '/delete/product/';
function removeProduct(id) {
axios.delete(deleteApiUrl + id)
.then((response) => {
emitBasketChange();
});
}
function emitBasketChange() {
eventBus.$emit('basket:changed');
}
export default {
removeProduct
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment