From 3767f1938a439adc794a29ea6fe28b2369b33fe1 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 7 Jan 2025 10:26:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(webhook):=20=E5=8A=A8=E6=80=81=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=20webhook=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改了 webhook通知功能,使其能够动态获取 key - 在发送请求时,使用 info.webhook 作为 key 的值,如果为空则使用默认值 --- src/rest/custom/webhook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/custom/webhook.js b/src/rest/custom/webhook.js index f17f2bc..17dabdf 100644 --- a/src/rest/custom/webhook.js +++ b/src/rest/custom/webhook.js @@ -14,7 +14,7 @@ module.exports = { > 发布版本:${info.version} > 打包完成时间:${info.download}` } - }, {params: {key: "a5971027-2dd3-4c23-a4e4-c99a962d25a7",}}).then(res => { + }, {params: {key: info.webhook || "a5971027-2dd3-4c23-a4e4-c99a962d25a7",}}).then(res => { response.send({code: 0, msg: res.data}) }) } else response.send({code: 1, err: "无法找到项目信息"})