import request from '@/utils/request'

// 查询任务列表
export function listTask(mapName) {
  return request({
    url: `/v1/path/list?map=${mapName}`,
    method: 'get',
    baseURL: '/pns',
  })
}

// 查询任务详细
export function getTask(mapName, taskName) {
  return request({
    url: `/v1/path?map=${mapName}&path=${taskName}`,
    method: 'get',
    baseURL: '/pns',
  })
}

// 新增任务
export function addTask(data) {
  return request({
    url: '/v1/path',
    method: 'post',
    data: data,
    baseURL: '/pns',
  })
}

// 删除任务
export function delTask(data) {
  return request({
    url: '/v1/path',
    method: 'delete',
    data: data,
    baseURL: '/pns'
  })
}

