import instance from './instance';

export const getApiList = async () => {
  const response = await instance.get('/api/v1/api');
  return response.data;
};

export const createApi = async (data: any) => {
  const response = await instance.post('/api/v1/api', data);
  return response.data;
};

export const updateApi = async (id: string, data: any) => {
  const response = await instance.put(`/api/v1/api/${id}`, data);
  return response.data;
};

export const deleteApi = async (id: string) => {
  const response = await instance.delete(`/api/v1/api/${id}`);
  return response.data;
};
