按pr要求修改

This commit is contained in:
qiaoyun680 2024-10-23 03:31:21 +00:00
parent 08df6175ed
commit 510fad7ab6
2 changed files with 1 additions and 1 deletions

View File

@ -156,6 +156,7 @@ export default class NotificationService {
const url = matchResult && matchResult[1] const url = matchResult && matchResult[1]
? `https://${matchResult[1]}.push.ft07.com/send/${serverChanKey}.send` ? `https://${matchResult[1]}.push.ft07.com/send/${serverChanKey}.send`
: `https://sctapi.ftqq.com/${serverChanKey}.send`; : `https://sctapi.ftqq.com/${serverChanKey}.send`;
try { try {
const res: any = await got const res: any = await got
.post(url, { .post(url, {

View File

@ -228,7 +228,6 @@ function serverNotify(text, desp) {
if (PUSH_KEY) { if (PUSH_KEY) {
// 微信server酱推送通知一个\n不会换行需要两个\n才能换行故做此替换 // 微信server酱推送通知一个\n不会换行需要两个\n才能换行故做此替换
desp = desp.replace(/[\n\r]/g, '\n\n'); desp = desp.replace(/[\n\r]/g, '\n\n');
const matchResult = PUSH_KEY.match(/^sctp(\d+)t/i); const matchResult = PUSH_KEY.match(/^sctp(\d+)t/i);
const options = { const options = {
url: matchResult && matchResult[1] url: matchResult && matchResult[1]