修复node pushdeer通知

This commit is contained in:
whyour
2022-09-04 18:25:40 +08:00
parent 952cdc0e3f
commit 4da8d8fe1e
4 changed files with 33 additions and 38 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ export enum NotificationMode {
'serverChan' = 'serverChan',
'pushDeer' = 'pushDeer',
'bark' = 'bark',
'chat' = 'chat'
'chat' = 'chat',
'telegramBot' = 'telegramBot',
'dingtalkBot' = 'dingtalkBot',
'weWorkBot' = 'weWorkBot',
@@ -40,7 +40,7 @@ export class PushDeerNotification extends NotificationBaseInfo {
export class ChatNotification extends NotificationBaseInfo {
public chatUrl = '';
public chattoken = '';
public chatToken = '';
}
export class BarkNotification extends NotificationBaseInfo {
+3 -5
View File
@@ -137,8 +137,8 @@ export default class NotificationService {
}
private async chat() {
const { chatUrl, chattoken } = this.params;
const url = `${chatUrl}${chattoken}`;
const { chatUrl, chatToken } = this.params;
const url = `${chatUrl}${chatToken}`;
const res: any = await got
.post(url, {
timeout: this.timeout,
@@ -147,9 +147,7 @@ export default class NotificationService {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
})
.json();
return (
res.success
);
return res.success;
}
private async bark() {