import request from '@/utils/request';

export const queryWorkList = (params) => {
  return request.request({
    url: '/admin/work/page',
    method: 'get',
    params,
  });
};

export const addWork = (data) => {
  return request.request({
    url: '/admin/work',
    method: 'post',
    data,
  });
};

export const updateWork = (data) => {
  return request.request({
    url: '/admin/work',
    method: 'put',
    data,
  });
};

export const deleteWork = (params) => {
  return request.request({
    url: '/admin/work',
    method: 'delete',
    params,
  });
};

export const queryWorkDetail = (params: { id: string }) => {
  return request.request({
    url: '/admin/work',
    method: 'get',
    params,
  });
};
