import http from './http'

export async function listUsers() {
  const response = await http.get('/users')
  return response.data
}

export async function createUser(data) {
  const response = await http.post('/users', data)
  return response.data
}

export async function updateUser(id, data) {
  const response = await http.patch(`/users/${id}`, data)
  return response.data
}

export async function deactivateUser(id) {
  const response = await http.delete(`/users/${id}`)
  return response.data
}