function deleteItem(itemId) {
  return {
    type: types.DELETE_ITEM,
    payload: axios
      .delete(`https://grubtoeat.herokuapp.com/api/MenuItems/${itemId}`)
      .then(res => {
        return {
          ...res.data,
          id: itemId
        };
      })
      .catch(err => console.log(err))
  };
}
//Deletes selected menu item from the restaurant's menu(s)
Deletes selected menu item from the restaurant's menu(s)
Deletes selected menu item from the restaurant ' s menu ( s )
function deleteItem(itemId) {
  return {
    type: types.DELETE_ITEM,
    payload: axios
      .delete(`https://grubtoeat.herokuapp.com/api/MenuItems/${itemId}`)
      .then(res => {
        return {
          ...res.data,
          id: itemId
        };
      })
      .catch(err => console.log(err))
  };
}
function deleteItem ( itemId ) { return { type : types . DELETE_ITEM , payload : axios . delete ( ` ${ itemId } ` ) . then ( res => { return { ... res . data , id : itemId } ; } ) . catch ( err => console . log ( err ) ) } ; }
Deletes selected menu item from the restaurant's menu(s)
Deletes selected menu item from the restaurant ' s menu ( s )