import request from '@/utils/request'

// 查询MQTT主题配置列表
export function listMqttConfig(query) {
  return request({
    url: '/worn/mqttConfig/list',
    method: 'get',
    params: query
  })
}

// 查询MQTT主题配置详细
export function getMqttConfig(id) {
  return request({
    url: '/worn/mqttConfig/' + id,
    method: 'get'
  })
}

// 新增MQTT主题配置
export function addMqttConfig(data) {
  return request({
    url: '/worn/mqttConfig',
    method: 'post',
    data: data
  })
}

// 修改MQTT主题配置
export function updateMqttConfig(data) {
  return request({
    url: '/worn/mqttConfig',
    method: 'put',
    data: data
  })
}

// 删除MQTT主题配置
export function delMqttConfig(id) {
  return request({
    url: '/worn/mqttConfig/' + id,
    method: 'delete'
  })
}
