import axios from 'axios';

const fetchCategory = async ({ cid }) => {
  return axios
    .get(`/api/categories/view?cid=${cid}`)
    .then(res => res)
    .catch(err => console.error(err));
};

export default fetchCategory;
