// Base
import * as base from './_crud-base'

const path = '/api/v1/monitoring/visit'
const name = 'monitoring-visit'

export async function getList(params: any = null) {
  let url = path
  if (params?.date && params.serviceType) {
    url += `/${params.date}/${params.serviceType}`
  }
  if (params) {
    delete params.date
    delete params.serviceType
  }
  const resp = await base.getList(url, params, name)

  return resp
}
