zhaoyingbo 50121dc073
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 1m56s
feat: 添加Test
2024-08-09 01:42:46 +00:00

16 lines
545 B
TypeScript

import manageRobot from "../../controllers/manageRobot"
import netTool from "../../service/netTool"
/**
* 处理管理CI监视器的请求。
* @param {Request} req - 请求对象。
* @returns {Response} - 响应对象。
*/
export const manageCIMonitorReq = async (req: Request): Promise<Response> => {
const url = new URL(req.url)
const chat_id = url.searchParams.get("chat_id")
if (!chat_id) return netTool.badRequest("chat_id is required!")
await manageRobot.sendCIReportByChatId(chat_id)
return netTool.ok("reporting...")
}