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