import axios from "axios";
const request = axios.create({
  baseURL: window.location.origin + "/api",
  timeout: 15000, // request timeout
});

request.interceptors.request.use((config) => {
  // const token = getToken()
  // config.headers["Authorization"] = "Bearer " + token
  return config;
});

request.interceptors.response.use((res) => {
  return res.data;
});

export default request;
