增加使用系统通知配置发送通知api

This commit is contained in:
whyour
2022-02-24 22:10:03 +08:00
parent 7ea9a8aa57
commit cb154437ac
2 changed files with 30 additions and 0 deletions
+9
View File
@@ -163,4 +163,13 @@ export default class SystemService {
return { code: 200 };
}
public async notify({ title, content }: { title: string; content: string }) {
const isSuccess = await this.notificationService.notify(title, content);
if (isSuccess) {
return { code: 200, data: '通知发送成功' };
} else {
return { code: 400, data: '通知发送失败,请检查参数' };
}
}
}