import request from './request';

export const getTasks = (params) => {
  return request.get('/b/tasks', { params });
};

export const getTaskEngineers = (params) => {
  return request.get('/b/tasks/engineers', { params });
};

export const publishTask = (data) => {
  return request.post('/b/tasks/publish', data);
};

export const acceptTask = (data) => {
  return request.post('/b/tasks/accept', data);
};

export const completeTask = (data) => {
  return request.post('/b/tasks/complete', data);
};

export const cancelTask = (data) => {
  return request.post('/b/tasks/cancel', data);
};
