zhaoyingbo 6e65581bbf
All checks were successful
Egg CI/CD / build-image (push) Successful in 32s
Egg CI/CD / deploy (push) Successful in 37s
feat: 接入lint 和 husky
2024-07-25 01:48:22 +00:00

38 lines
691 B
TypeScript

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