import request from '@/utils/request'
import { postForm } from '@/utils/legacyRequest'

const headers = { isToken: false }

export function listProject(query) {
  return postForm('/risk/project/list', query, { headers })
}

export function getProject(projectId) {
  return request({
    url: '/risk/project/' + projectId,
    method: 'get',
    headers
  })
}

export function addProject(data) {
  return postForm('/risk/project/add', data, { headers })
}

export function updateProject(data) {
  return postForm('/risk/project/edit', data, { headers })
}

export function delProject(projectId) {
  return postForm('/risk/project/remove', { ids: projectId }, { headers })
}
