From 838171e62a55f525442751e9fdd7e7262544da82 Mon Sep 17 00:00:00 2001 From: tangyanbiao Date: Tue, 21 Dec 2021 15:07:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=BD=E5=BF=AB=E5=93=8D=E5=BA=94200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/txc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/txc.ts b/api/txc.ts index 76717e5..705d0dc 100644 --- a/api/txc.ts +++ b/api/txc.ts @@ -34,7 +34,7 @@ function handleMessage(name: string, data: any): string { return `${name}有${action}: ${content}` } -async function main(req: VercelRequest, res: VercelResponse) { +function main(req: VercelRequest, res: VercelResponse) { if (req.method !== 'POST') { res.setHeader('Allow', 'POST') return res.status(405).end('Method Not Allowed') @@ -44,10 +44,10 @@ async function main(req: VercelRequest, res: VercelResponse) { const product = req.query.product.toString() || 'Unknown' const content = handleMessage(product, req.body) if (bots.indexOf('TELEGRAM') >= 0) { - await sendToTelegram(content) + sendToTelegram(content) } if (bots.indexOf('FEISHU') >= 0) { - await sendToFeishu(content) + sendToFeishu(content) } return res.status(200).end('ok') } catch (e) {