import { request } from 'umi';

export async function unitList(data) {
  return request(`/kitchen/api/goods-unit/type`, {
    method: 'Post',
    data: data,
  });
}
export async function addunit(data) {
  return request('/kitchen/api/goods-unit', {
    method: 'POST',
    data: data,
  });
}
export async function updateunit(data) {
  return request('/kitchen/api/goods-unit', {
    method: 'PUT',
    data: data,
  });
}
export async function removeunit(data) {
  console.log(data);
  return request(`/kitchen/api/goods-unit`, {
    method: 'DELETE',
    data: data,
  });
}

export async function removeSingleunit(id) {
  return request(`/kitchen/api/goods-unit/${id}`, {
    method: 'DELETE',
  });
}
