import axios from "axios";

const API_BASE = process.env.WATCH_FINISHED_API || "http://localhost:3001";

export async function get(path: string, params?: any) {
  const res = await axios.get(`${API_BASE}${path}`, { params });
  return res.data;
}

export async function post(path: string, data?: any) {
  const res = await axios.post(`${API_BASE}${path}`, data);
  return res.data;
}

export async function del(path: string, params?: any) {
  const res = await axios.delete(`${API_BASE}${path}`, { params });
  return res.data;
}
