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

const headers = { isToken: false }

export function listOrg(query) {
  return postForm('/risk/org/list', query, { headers })
}

export function getOrg(orgId) {
  return request({
    url: '/risk/org/' + orgId,
    method: 'get',
    headers
  })
}

export function addOrg(data) {
  return postForm('/risk/org/add', data, { headers })
}

export function updateOrg(data) {
  return postForm('/risk/org/edit', data, { headers })
}

export function delOrg(orgId) {
  return postForm('/risk/org/remove', { ids: orgId }, { headers })
}
