修复设置自定义通知

This commit is contained in:
whyour
2022-09-20 18:00:36 +08:00
parent 1ebcfd8001
commit e08f0cd308
6 changed files with 68 additions and 68 deletions
+5 -2
View File
@@ -6,6 +6,7 @@ import got from 'got';
import nodemailer from 'nodemailer';
import crypto from 'crypto';
import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent';
import { parseBody, parseHeaders } from '../config/util';
@Service()
export default class NotificationService {
@@ -388,10 +389,12 @@ export default class NotificationService {
const { webhookUrl, webhookBody, webhookHeaders, webhookMethod, webhookContentType } =
this.params;
const bodyParam = this.formatBody(webhookContentType, webhookBody);
const headers = parseHeaders(webhookHeaders);
const body = parseBody(webhookBody, webhookContentType);
const bodyParam = this.formatBody(webhookContentType, body);
const options = {
method: webhookMethod,
headers: webhookHeaders,
headers,
timeout: this.timeout,
retry: 0,
allowGetBody: true,