import axios from 'axios';
import fetchAdapter from '@vespaiach/axios-fetch-adapter';
import { workerApiUrl } from '@/config/env';

export const apiWorker = axios.create({
  baseURL: workerApiUrl,
  timeout: 5000,
  adapter: fetchAdapter,
});

apiWorker.interceptors.response.use((response) => response.data);
