修复自定义通知

This commit is contained in:
whyour
2023-03-07 22:20:08 +08:00
parent 98dfa4c425
commit b2167ae5e4
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -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);
+4 -4
View File
@@ -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),
}; };
} }
} }
+1 -1
View File
@@ -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);
} }