import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/api/v1/tenant/page',
    method: 'post',
    data
  })
}

export function getAllList() {
  return request({
    url: '/api/v1/tenant/inner/list',
    method: 'post'
  })
}

export function add(data) {
  return request({
    url: '/api/v1/tenant/add',
    method: 'post',
    // headers: { 'content-type': 'application/json' },
    data
  })
}

export function deleteById(id) {
  return request({
    url: `/api/v1/tenant/del/${id}`,
    method: 'get'
  })
}

export function updateStatusById(id, status = false) {
  return request({
    url: `/api/v1/tenant/auth${status ? '' : '/cancel'}/${id}`,
    method: 'post'
  })
}
