import { SysNotifyChannel } from '@/entity/upms/notify-channel'
import axios from '@/utils/axios'

const baseUrl = 'sys/notify/channel'
/**
 * 获取所有消息通道配置
 * @returns Array<SysNotifyChannel>
 */
export function getConfig() {
  return axios.post(`${baseUrl}/get/config`)
}

/**
 * 编辑某项配置
 * @param data 数据{type,config}
 */
export function editConfig(data: SysNotifyChannel) {
  return axios.post(`${baseUrl}/edit/config`, data)
}
