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