import axios from 'axios';

const fetchListByCategory = ({ cid }) => {
  return axios
    .get(`/api/products/listByCategory?cid=${cid}`)
    .then(res => res)
    .catch(err => console.error(err));
};

export default fetchListByCategory;
