import axios from "../../utils/axios";

// MQTT发送消息
export function sendMqttMessage(params) {
  return axios.post(`/SZWL-SERVER/mqtt/sendMsg`, params);
}

// 获取接收消息列表
export function getMsgList(params) {
  return axios.post(`/SZWL-SERVER/mqtt/getMsgList`, params);
}

// 添加主题
export function addMqttTopic(params) {
  return axios.post(`/SZWL-SERVER/mqtt/addTopic`, params);
}

// 获取订阅列表
export function getSubscribeList() {
  return axios.get(`/SZWL-SERVER/mqtt/getTopicList`);
}

// 删除订阅
export function delSubscribe(params) {
  return axios.post(`/SZWL-SERVER/mqtt/delTopic`, params);
}