mirror of
https://github.com/certd/certd.git
synced 2026-04-05 07:20:56 +08:00
fix: 当通知配置被删除时,使用默认通知配置进行发送
This commit is contained in:
@@ -179,15 +179,13 @@ export class NotificationService extends BaseService<NotificationEntity> {
|
||||
if (req.id && req.id > 0) {
|
||||
notifyConfig = await this.getById(req.id, userId);
|
||||
if (!notifyConfig) {
|
||||
logger.warn(`未找到通知配置<${req.id}>`);
|
||||
logger.warn(`未找到通知配置<${req.id}>,请确认是否已被删除`);
|
||||
}
|
||||
}
|
||||
if (!notifyConfig) {
|
||||
if (req.id === 0 || req.useDefault) {
|
||||
notifyConfig = await this.getDefault(userId);
|
||||
if (!notifyConfig) {
|
||||
logger.warn(`未找到默认通知配置`);
|
||||
}
|
||||
notifyConfig = await this.getDefault(userId);
|
||||
if (!notifyConfig) {
|
||||
logger.warn(`未找到默认通知配置`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user