import { appservice } from '@/utils/apiService'

const baseUrl = '/api/device-warning'

export function getList(params) {
  return appservice({
    url: `${baseUrl}`,
    method: 'get',
    params
  })
}

export function getDetails(params) {
  return appservice({
    url: `${baseUrl}/details`,
    method: 'get',
    params
  })
}

export function create(data) {
  return appservice({
    url: `${baseUrl}`,
    method: 'post',
    data
  })
}

export function submit(id, data) {
  return appservice({
    url: `${baseUrl}/submit/${id}`,
    method: 'post',
    data
  })
}

export function revoke(id) {
  return appservice({
    url: `${baseUrl}/revoke/${id}`,
    method: 'post'
  })
}
