import { LarkEvent } from "../../types"; import netTool from "../netTool"; /** * 请求 CI 监控 */ const ciMonitor = async (chat_id: string) => { const URL = `https://ci-monitor.xiaomiwh.cn/ci?chat_id=${chat_id}`; try { const res = await netTool.get(URL); return (res as string) || ""; } catch { return ""; } }; /** * 请求简报收集器 * @param body * @returns */ const reportCollector = async (body: LarkEvent.Data) => { const URL = "https://report.imoaix.cn/report"; try { const res = await netTool.post(URL, body); return (res as string) || ""; } catch { return ""; } }; const attach = { ciMonitor, reportCollector, }; export default attach;