vault backup: 2026-11-09 09:42:19
This commit is contained in:
1 parent
511f907980
commit
5022dc27b2
8 files changed
+103
-9
No files matched your search
+5
-2
@@ -26,8 +26,11 @@ async function postJson(url, payload, headers = {}) {
|
||||
|
||||
async function sendWebhook(hook, title, text, extra) {
|
||||
const type = (hook.type || 'custom').toLowerCase();
|
||||
const url = hook.url;
|
||||
if (!url) throw new Error('webhook.url 为空');
|
||||
// url 支持 "env:变量名" —— 密钥不落在配置文件里(Obsidian 库会同步/进 Git)
|
||||
const url = typeof hook.url === 'string' && hook.url.startsWith('env:')
|
||||
? process.env[hook.url.slice(4)]
|
||||
: hook.url;
|
||||
if (!url) throw new Error('webhook.url 为空(或 env: 指定的环境变量未设置)');
|
||||
|
||||
switch (type) {
|
||||
case 'feishu': // 飞书自定义机器人
|
||||
|
||||
Reference in new issue
Block a user