import axios from 'axios';
import { API_PREF } from './common';

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

export default fetchProduct;
