mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
webhook 通知 body 增加 text/plain 类型,修复多定时任务服务重启未初始化
This commit is contained in:
@@ -659,9 +659,11 @@ export default class NotificationService {
|
||||
webhookUrl,
|
||||
webhookBody,
|
||||
);
|
||||
|
||||
if (!formatUrl && !formatBody) {
|
||||
return false;
|
||||
throw new Error('Url 或者 Body 中必须包含 $title')
|
||||
}
|
||||
|
||||
const headers = parseHeaders(webhookHeaders);
|
||||
const body = parseBody(formatBody, webhookContentType);
|
||||
const bodyParam = this.formatBody(webhookContentType, body);
|
||||
@@ -692,6 +694,7 @@ export default class NotificationService {
|
||||
case 'multipart/form-data':
|
||||
return { form: body };
|
||||
case 'application/x-www-form-urlencoded':
|
||||
case 'text/plain':
|
||||
return { body };
|
||||
}
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user