Compare commits

...

3 Commits

Author SHA1 Message Date
aixianling
456e55bb2e build(Dockerfile): 设置时区为亚洲/上海
- 在 Dockerfile 中添加环境变量 TZ=Asia/Shanghai
- 这个改动将使容器运行时使用北京时间
2025-01-08 16:33:47 +08:00
aixianling
8586b76ef2 feat(node): 添加自定义节点配置的 webhook 字段
- 在 node_custom_config 表单中新增 webhook 字段
- 通过 REST API 接口 /node/custom/addOrUpdate 添加或更新自定义节点配置时,支持 webhook 参数
2025-01-08 15:41:30 +08:00
aixianling
3767f1938a feat(webhook): 动态获取 webhook key
- 修改了 webhook通知功能,使其能够动态获取 key
- 在发送请求时,使用 info.webhook 作为 key 的值,如果为空则使用默认值
2025-01-07 10:26:42 +08:00
3 changed files with 5 additions and 3 deletions

View File

@@ -7,4 +7,6 @@ RUN npm i --registry=http://registry.npmmirror.com
EXPOSE 12525 EXPOSE 12525
ENV TZ=Asia/Shanghai
CMD ["node", "index.js"] CMD ["node", "index.js"]

View File

@@ -3,10 +3,10 @@ module.exports = {
action: "/node/custom/addOrUpdate", action: "/node/custom/addOrUpdate",
method: "post", method: "post",
execute: (request, response) => { execute: (request, response) => {
let {id, name, type, customPath, apps, createTime, dist, version, zipTime, download, error, extra} = request.body let {id, name, type, customPath, apps, createTime, dist, version, zipTime, download, error, extra,webhook} = request.body
dbUtils.addOrUpdate({ dbUtils.addOrUpdate({
table: 'node_custom_config', table: 'node_custom_config',
form: {id, name, type, customPath, apps, createTime, dist, version, zipTime, download, error, extra} form: {id, name, type, customPath, apps, createTime, dist, version, zipTime, download, error, extra,webhook}
}).then(data => { }).then(data => {
response.send({code: 0, data}) response.send({code: 0, data})
}).catch(err => { }).catch(err => {

View File

@@ -14,7 +14,7 @@ module.exports = {
> 发布版本:${info.version} > 发布版本:${info.version}
> 打包完成时间:${info.download}` > 打包完成时间:${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}) response.send({code: 0, msg: res.data})
}) })
} else response.send({code: 1, err: "无法找到项目信息"}) } else response.send({code: 1, err: "无法找到项目信息"})