mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复自定义通知
This commit is contained in:
parent
98dfa4c425
commit
b2167ae5e4
|
@ -41,6 +41,7 @@ export default async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 运行所有订阅
|
// 运行所有订阅
|
||||||
|
await subscriptionService.setSshConfig();
|
||||||
const subs = await subscriptionService.list();
|
const subs = await subscriptionService.list();
|
||||||
for (const sub of subs) {
|
for (const sub of subs) {
|
||||||
subscriptionService.handleTask(sub, !sub.is_disabled, !sub.is_disabled);
|
subscriptionService.handleTask(sub, !sub.is_disabled, !sub.is_disabled);
|
||||||
|
|
|
@ -484,11 +484,11 @@ export default class NotificationService {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
formatUrl: url
|
formatUrl: url
|
||||||
.replaceAll('$title', encodeURIComponent(this.title))
|
?.replaceAll('$title', encodeURIComponent(this.title))
|
||||||
.replaceAll('$content', encodeURIComponent(this.content)),
|
?.replaceAll('$content', encodeURIComponent(this.content)),
|
||||||
formatBody: body
|
formatBody: body
|
||||||
.replaceAll('$title', this.title)
|
?.replaceAll('$title', this.title)
|
||||||
.replaceAll('$content', this.content),
|
?.replaceAll('$content', this.content),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ export default class SubscriptionService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async setSshConfig() {
|
public async setSshConfig() {
|
||||||
const docs = await SubscriptionModel.findAll();
|
const docs = await SubscriptionModel.findAll();
|
||||||
this.sshKeyService.setSshConfig(docs);
|
this.sshKeyService.setSshConfig(docs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user