import instance from './instance';

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

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

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

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