From ca57791d51ec7adcfc0228ea5e625d314b7b8e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Sat, 7 Oct 2023 22:36:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A9=E7=94=A8=20exec=20=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E9=98=B2=E6=AD=A2=E9=87=8D=E5=90=AF=E9=80=A0=E6=88=90?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 085edfb..f7e9ae3 100644 --- a/index.js +++ b/index.js @@ -120,11 +120,9 @@ app.ws('/entanglement', (ws, req) => { // WEBHOOK 处理 GitHub 事件 app.post('/webhook', (req, res) => { - console.log('WEBHOOK:', req.body) - return exec('git pull;npm i', (err, stdout, stderr) => { - if (err) return res.status(500).json({ error: err }) - return res.json({ stdout, stderr }) - }) + console.log('WEBHOOK:' + new Date().toLocaleString()) + exec('git pull;npm i') + return res.json({ success: true }) }) app.listen(4096, () => console.log('Server started on port 4096'))